@@ -362,11 +362,11 @@ def test_interpolate_2d_mask_middle(x_new, y_new, expected):
362362def test_interpolate_2d_nearest (x_new , y_new , expected ):
363363 x = np .array ([1 , 2 , 3 ])
364364 y = np .array ([10 , 20 ])
365- z = ma .array ([[1 , 2 ], [3 , 4 ], [5 , 6 ]], mask = False )
365+ z = ma .array ([[1.0 , 2.0 ], [3.0 , 4.0 ], [5.0 , 6.0 ]], mask = False )
366366
367367 result = utils .interpolate_2d_nearest (x , y , z , x_new , y_new )
368- assert_array_almost_equal (expected .data , result .data )
369368 assert_array_equal (expected .mask , result .mask )
369+ assert_array_almost_equal (expected , result )
370370
371371
372372@pytest .mark .parametrize (
@@ -388,7 +388,7 @@ def test_interpolate_2d_nearest_2(x_new, y_new, expected):
388388 x = np .array ([1 , 2 , 3 , 4 , 5 ])
389389 y = np .array ([10 , 20 ])
390390 z = ma .array (
391- [[1 , 2 ], [3 , 4 ], [5 , 6 ], [7 , 8 ], [9 , 10 ]],
391+ [[1.0 , 2.0 ], [3.0 , 4.0 ], [5.0 , 6.0 ], [7.0 , 8.0 ], [9.0 , 10.0 ]],
392392 mask = [
393393 [False , False ],
394394 [False , False ],
@@ -399,8 +399,8 @@ def test_interpolate_2d_nearest_2(x_new, y_new, expected):
399399 )
400400
401401 result = utils .interpolate_2d_nearest (x , y , z , x_new , y_new )
402- assert_array_almost_equal (expected .data , result .data )
403- assert_array_almost_equal (expected . mask , result . mask )
402+ assert_array_equal (expected .mask , result .mask )
403+ assert_array_almost_equal (expected , result )
404404
405405
406406class TestArrayToProbability :
0 commit comments