@@ -213,7 +213,7 @@ class pointOpTests(unittest.TestCase):
213213 def test1 (self ):
214214 matImg = scipy .io .loadmat (op .join (matfiles_path , 'pointOp1.mat' ))
215215 img = pt .synthetic_images .ramp ((200 ,200 ))
216- filt = np .array ([0.2 , 0.5 , 1.0 , 0.4 , 0.1 ]);
216+ filt = np .asarray ([0.2 , 0.5 , 1.0 , 0.4 , 0.1 ]);
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 ))
@@ -249,15 +249,15 @@ def test13(self):
249249
250250class binomialFilterTests (unittest .TestCase ):
251251 def test1 (self ):
252- target = np .array ([[0.5 ],[0.5 ]])
252+ target = np .asarray ([[0.5 ],[0.5 ]])
253253 #target = target / np.sqrt(np.sum(target ** 2))
254254 self .assertTrue ((pt .binomial_filter (2 ) == target ).all () )
255255 def test2 (self ):
256- target = np .array ([[0.25 ], [0.5 ], [0.25 ]])
256+ target = np .asarray ([[0.25 ], [0.5 ], [0.25 ]])
257257 #target = target / np.sqrt(np.sum(target ** 2))
258258 self .assertTrue ((pt .binomial_filter (3 ) == target ).all ())
259259 def test3 (self ):
260- target = np .array ([[0.0625 ], [0.25 ], [0.3750 ], [0.25 ], [0.0625 ]])
260+ target = np .asarray ([[0.0625 ], [0.25 ], [0.3750 ], [0.25 ], [0.0625 ]])
261261 #target = target / np.sqrt(np.sum(target ** 2))
262262 self .assertTrue ((pt .binomial_filter (5 ) == target ).all ())
263263
@@ -269,13 +269,13 @@ def test1(self):
269269 self .assertTrue (pt .comparePyr (matPyr ['pyr' ], pyPyr ))
270270 def test2 (self ):
271271 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'buildGpyr2row.mat' ))
272- img = np .array (list (range (256 ))).astype (float )
272+ img = np .asarray (list (range (256 ))).astype (float )
273273 img = img .reshape (1 , 256 )
274274 pyPyr = pt .pyramids .GaussianPyramid (img )
275275 self .assertTrue (pt .comparePyr (matPyr ['pyr' ], pyPyr ))
276276 def test3 (self ):
277277 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'buildGpyr2col.mat' ))
278- img = np .array (list (range (256 ))).astype (float )
278+ img = np .asarray (list (range (256 ))).astype (float )
279279 img = img .reshape (256 , 1 )
280280 pyPyr = pt .pyramids .GaussianPyramid (img )
281281 self .assertTrue (pt .comparePyr (matPyr ['pyr' ], pyPyr ))
@@ -318,17 +318,17 @@ def test4(self):
318318 self .assertTrue (pt .comparePyr (matPyr ['pyr' ], pyPyr ))
319319 def test5 (self ):
320320 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'buildLpyr5.mat' ))
321- pyRamp = np .array (list (range (200 ))).reshape (1 , 200 )
321+ pyRamp = np .asarray (list (range (200 ))).reshape (1 , 200 )
322322 pyPyr = pt .pyramids .LaplacianPyramid (pyRamp )
323323 self .assertTrue (pt .comparePyr (matPyr ['pyr' ], pyPyr ))
324324 def test5bis (self ):
325325 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'buildLpyr5.mat' ))
326- pyRamp = np .array (list (range (200 )))
326+ pyRamp = np .asarray (list (range (200 )))
327327 pyPyr = pt .pyramids .LaplacianPyramid (pyRamp )
328328 self .assertTrue (pt .comparePyr (matPyr ['pyr' ], pyPyr ))
329329 def test6 (self ):
330330 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'buildLpyr6.mat' ))
331- pyRamp = np .array (list (range (200 )))
331+ pyRamp = np .asarray (list (range (200 )))
332332 pyPyr = pt .pyramids .LaplacianPyramid (pyRamp )
333333 self .assertTrue (pt .comparePyr (matPyr ['pyr' ], pyPyr ))
334334 def test7 (self ):
@@ -1145,16 +1145,16 @@ def test0(self):
11451145 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'imGradient0.mat' ))
11461146 ramp = pt .synthetic_images .ramp (10 )
11471147 [dx ,dy ] = pt .image_gradient (ramp )
1148- dx = np .array (dx )
1149- dy = np .array (dy )
1148+ dx = np .asarray (dx )
1149+ dy = np .asarray (dy )
11501150 self .assertTrue (pt .compareRecon (matPyr ['res' ][:,:,0 ], dx ))
11511151 self .assertTrue (pt .compareRecon (matPyr ['res' ][:,:,1 ], dy ))
11521152 def test1 (self ):
11531153 matPyr = scipy .io .loadmat (op .join (matfiles_path , 'imGradient1.mat' ))
11541154 ramp = pt .synthetic_images .ramp (10 )
11551155 [dx ,dy ] = pt .image_gradient (ramp , 'reflect1' )
1156- dx = np .array (dx )
1157- dy = np .array (dy )
1156+ dx = np .asarray (dx )
1157+ dy = np .asarray (dy )
11581158 self .assertTrue (pt .compareRecon (matPyr ['res' ][:,:,0 ], dx ))
11591159 self .assertTrue (pt .compareRecon (matPyr ['res' ][:,:,1 ], dy ))
11601160
0 commit comments