9
9
from nose .tools import assert_equal , assert_raises
10
10
from numpy .testing import assert_array_equal , assert_array_almost_equal ,\
11
11
assert_array_less
12
+ import numpy .ma .testutils as matest
12
13
from matplotlib .testing .decorators import image_comparison
13
14
import matplotlib .cm as cm
14
15
from matplotlib .path import Path
@@ -323,7 +324,7 @@ def test_triinterp():
323
324
xs , ys = np .meshgrid (xs , ys )
324
325
for interp in (linear_interp , cubic_min_E , cubic_geom ):
325
326
zs = interp (xs , ys )
326
- assert_array_almost_equal (zs , (1.23 * xs - 4.79 * ys ))
327
+ matest . assert_array_almost_equal (zs , (1.23 * xs - 4.79 * ys ))
327
328
mask = (xs >= 1 ) * (xs <= 2 ) * (ys >= 1 ) * (ys <= 2 )
328
329
assert_array_equal (zs .mask , mask )
329
330
@@ -697,7 +698,8 @@ def z(x, y):
697
698
interp_z0 [interp_key ] = interp (xs0 , ys0 ) # storage
698
699
else :
699
700
interpz = interp (xs , ys )
700
- assert_array_almost_equal (interpz , interp_z0 [interp_key ])
701
+ matest .assert_array_almost_equal (interpz ,
702
+ interp_z0 [interp_key ])
701
703
702
704
scale_factor = 987654.3210
703
705
for scaled_axis in ('x' , 'y' ):
@@ -723,7 +725,7 @@ def z(x, y):
723
725
# 1 axis...
724
726
for interp_key in ['lin' , 'min_E' , 'geom' ]:
725
727
interpz = dic_interp [interp_key ](xs , ys )
726
- assert_array_almost_equal (interpz , interp_z0 [interp_key ])
728
+ matest . assert_array_almost_equal (interpz , interp_z0 [interp_key ])
727
729
728
730
729
731
@image_comparison (baseline_images = ['tri_smooth_contouring' ],
0 commit comments