diff --git a/cis/collocation/data_index.py b/cis/collocation/data_index.py index ac13e510..a80c0804 100644 --- a/cis/collocation/data_index.py +++ b/cis/collocation/data_index.py @@ -77,11 +77,11 @@ def index_data(self, coords, hyper_points, coord_map): # Output is a list of coordinates which lists the indexes where the hyper points # should be located in the grid indices = np.vstack( - np.where( - ci < max_coordinate_value, - np.searchsorted(bi, ci, side='right') - 1, - -1) - for bi, ci, max_coordinate_value in bounds_coords_max) + [np.where( + ci < max_coordinate_value, + np.searchsorted(bi, ci, side='right') - 1, + -1) + for bi, ci, max_coordinate_value in bounds_coords_max]) # D-tuple giving the shape of the output grid grid_shape = tuple(len(bi_ci[0]) for bi_ci in bounds_coords_max) diff --git a/cis/test/unit/test_api.py b/cis/test/unit/test_api.py index 13a4e7a1..549fcd0d 100644 --- a/cis/test/unit/test_api.py +++ b/cis/test/unit/test_api.py @@ -6,7 +6,7 @@ from cis.test.util.mock import make_mock_cube, make_regular_2d_ungridded_data from cis.data_io.gridded_data import make_from_cube import numpy as np -from numpy.testing.utils import assert_array_almost_equal +from numpy.testing import assert_array_almost_equal class TestAPI(TestCase):