@@ -217,7 +217,7 @@ def test1(self):
217217 #foo = pointOp(200, 200, img, 5, filt, 0, 1, 0);
218218 foo = pt .pointOp (img , filt , 0 , 1 );
219219 foo = np .reshape (foo ,(200 ,200 ))
220- self . assertTrue (( matImg ['foo' ] == foo ). all () )
220+ np . testing . assert_allclose ( matImg ['foo' ], foo )
221221
222222class maxPyrHeightTests (unittest .TestCase ):
223223 def test1 (self ):
@@ -336,7 +336,7 @@ def test7(self):
336336 img = plt .imread (op .join (test_data_path , 'lenna-256x256.tif' ))
337337 pyPyr = pt .pyramids .LaplacianPyramid (img )
338338 recon = pyPyr .recon_pyr ()
339- self . assertTrue (( matPyr ['recon' ] == recon ). all () )
339+ np . testing . assert_allclose ( matPyr ['recon' ], recon )
340340 def test8 (self ):
341341 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'buildLpyr8.mat' ))
342342 pyRamp = pt .synthetic_images .ramp (200 )
@@ -360,13 +360,13 @@ def test11(self):
360360 pyRamp = pt .synthetic_images .ramp ((200 ,200 ))
361361 pyPyr = pt .pyramids .LaplacianPyramid (pyRamp )
362362 recon = pyPyr .recon_pyr (levels = [1 ])
363- self . assertTrue (( matPyr ['recon' ] == recon ). all () )
363+ np . testing . assert_allclose ( matPyr ['recon' ], recon )
364364 def test12 (self ):
365365 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'buildLpyr12.mat' ))
366366 pyRamp = pt .synthetic_images .ramp ((200 ,200 ))
367367 pyPyr = pt .pyramids .LaplacianPyramid (pyRamp )
368368 recon = pyPyr .recon_pyr (levels = [0 , 2 , 4 ])
369- self . assertTrue (( matPyr ['recon' ] == recon ). all () )
369+ np . testing . assert_allclose ( matPyr ['recon' ], recon )
370370
371371class WpyrTests (unittest .TestCase ):
372372 def test0 (self ):
0 commit comments