@@ -72,11 +72,11 @@ def test_geo_grid_transform_interoperability(self):
7272 dtype = 'S4,i4,f8,f8' ,
7373 names = ['site' , 'zone' , 'east' , 'north' ])
7474
75- geoed_grid = np .array (list ( grid2geo (* x ) for x in test_grid_coords [['zone' , 'east' , 'north' ]]) )
75+ geoed_grid = np .array ([ grid2geo (* x ) for x in test_grid_coords [['zone' , 'east' , 'north' ]]] )
7676 np .testing .assert_almost_equal (geoed_grid [:, :2 ], hp2dec_v (np .array (test_geo_coords [['lat' , 'lon' ]].tolist ())),
7777 decimal = 8 )
7878
79- gridded_geo = np .stack (geo2grid (* x ) for x in hp2dec_v (np .array (test_geo_coords [['lat' , 'lon' ]].tolist ())))
79+ gridded_geo = np .stack ([ geo2grid (* x ) for x in hp2dec_v (np .array (test_geo_coords [['lat' , 'lon' ]].tolist ()))] )
8080 np .testing .assert_almost_equal (gridded_geo [:, 2 :4 ].astype (float ),
8181 np .array (test_grid_coords [['east' , 'north' ]].tolist ()),
8282 decimal = 3 )
@@ -93,11 +93,14 @@ def test_geo_grid_transform_interoperability_isg(self):
9393 dtype = 'S4,i4,f8,f8' ,
9494 names = ['site' , 'zone' , 'east' , 'north' ])
9595
96- geoed_grid = np .array (list (grid2geo (* x , ellipsoid = ans , prj = isg ) for x in test_grid_coords [['zone' , 'east' , 'north' ]]))
96+ geoed_grid = np .array ([grid2geo (* x , ellipsoid = ans , prj = isg )
97+ for x in test_grid_coords [['zone' , 'east' , 'north' ]]])
9798 np .testing .assert_almost_equal (geoed_grid [:, :2 ], np .array (test_geo_coords [['lat' , 'lon' ]].tolist ()),
9899 decimal = 8 )
99100
100- gridded_geo = np .stack (geo2grid (* x , ellipsoid = ans , prj = isg ) for x in np .array (test_geo_coords [['lat' , 'lon' ]].tolist ()))
101+ gridded_geo = np .stack ([geo2grid (* x , ellipsoid = ans , prj = isg )
102+ for x in np .array (test_geo_coords [['lat' , 'lon' ]].tolist ())
103+ ])
101104 np .testing .assert_almost_equal (gridded_geo [:, 2 :4 ].astype (float ),
102105 np .array (test_grid_coords [['east' , 'north' ]].tolist ()),
103106 decimal = 3 )
0 commit comments