Пример #1
0
    def test_get_axis_coordinates(self):
        grid = Structured((1, 1, 4, 4, 5, 5), (2, 3, 2, 3, 2, 3), (3, 2),
                          units=('m', 'km'))

        self.assertArrayEqual(grid.get_axis_coordinates(0),
                              np.array([1., 1., 4., 4., 5., 5.]))
        self.assertArrayEqual(grid.get_axis_coordinates(1),
                              np.array([2., 3., 2., 3., 2., 3.]))
    def test_get_axis_coordinates(self):
        grid = Structured(
            (1, 1, 4, 4, 5, 5), (2, 3, 2, 3, 2, 3), (3, 2), units=("m", "km")
        )

        self.assertArrayEqual(
            grid.get_axis_coordinates(0), np.array([1.0, 1.0, 4.0, 4.0, 5.0, 5.0])
        )
        self.assertArrayEqual(
            grid.get_axis_coordinates(1), np.array([2.0, 3.0, 2.0, 3.0, 2.0, 3.0])
        )