@@ -12,7 +12,7 @@ def testCreates(self):
1212 self .assertTrue (isinstance (B , BBox ))
1313
1414 def testType (self ):
15- B = N .array (((0 ,0 ),(5 ,5 )))
15+ B = np .array (((0 ,0 ),(5 ,5 )))
1616 self .assertFalse (isinstance (B , BBox ))
1717
1818 def testDataType (self ):
@@ -30,7 +30,7 @@ def testShape3(self):
3030 self .assertRaises (ValueError , BBox , (0 ,0 ,5 ,6 ,7 ) )
3131
3232 def testArrayConstruction (self ):
33- A = N .array (((4 ,5 ),(10 ,12 )), N .float64 )
33+ A = np .array (((4 ,5 ),(10 ,12 )), np .float64 )
3434 B = BBox (A )
3535 self .assertTrue (isinstance (B , BBox ))
3636
@@ -73,13 +73,13 @@ def testPassThrough2(self):
7373
7474 def testPassArray (self ):
7575 # Different data type
76- A = N .array ( (((0 ,0 ),(5 ,5 ))) )
76+ A = np .array ( (((0 ,0 ),(5 ,5 ))) )
7777 C = asBBox (A )
7878 self .assertFalse (A is C )
7979
8080 def testPassArray2 (self ):
8181 # same data type -- should be a view
82- A = N .array ( (((0 ,0 ),(5 ,5 ))), N .float64 )
82+ A = np .array ( (((0 ,0 ),(5 ,5 ))), np .float64 )
8383 C = asBBox (A )
8484 A [0 ,0 ] = - 10
8585 self .assertTrue (C [0 ,0 ] == A [0 ,0 ])
@@ -190,17 +190,17 @@ def testNotSame(self):
190190
191191 def testWithArray (self ):
192192 B = BBox ( ( (1.0 , 2.0 ), (5.0 , 10.0 ) ) )
193- C = N .array ( ( (1.0 , 2.0 ), (5.0 , 10.0 ) ) )
193+ C = np .array ( ( (1.0 , 2.0 ), (5.0 , 10.0 ) ) )
194194 self .assertTrue (B == C )
195195
196196 def testWithArray2 (self ):
197197 B = BBox ( ( (1.0 , 2.0 ), (5.0 , 10.0 ) ) )
198- C = N .array ( ( (1.0 , 2.0 ), (5.0 , 10.0 ) ) )
198+ C = np .array ( ( (1.0 , 2.0 ), (5.0 , 10.0 ) ) )
199199 self .assertTrue (C == B )
200200
201201 def testWithArray2 (self ):
202202 B = BBox ( ( (1.0 , 2.0 ), (5.0 , 10.0 ) ) )
203- C = N .array ( ( (1.01 , 2.0 ), (5.0 , 10.0 ) ) )
203+ C = np .array ( ( (1.01 , 2.0 ), (5.0 , 10.0 ) ) )
204204 self .assertFalse (C == B )
205205
206206class testInside (wtc .WidgetTestCase ):
@@ -338,10 +338,10 @@ def testPointOnBottomRight(self):
338338class testFromPoints (wtc .WidgetTestCase ):
339339
340340 def testCreate (self ):
341- Pts = N .array ( ((5 ,2 ),
341+ Pts = np .array ( ((5 ,2 ),
342342 (3 ,4 ),
343343 (1 ,6 ),
344- ), N .float64 )
344+ ), np .float64 )
345345 B = fromPoints (Pts )
346346 #B = BBox( ( (1.0, 2.0), (5.0, 10.0) ) )
347347 self .assertTrue (B [0 ,0 ] == 1.0 and
@@ -350,7 +350,7 @@ def testCreate(self):
350350 B [1 ,1 ] == 6.0
351351 )
352352 def testCreateInts (self ):
353- Pts = N .array ( ((5 ,2 ),
353+ Pts = np .array ( ((5 ,2 ),
354354 (3 ,4 ),
355355 (1 ,6 ),
356356 ) )
@@ -362,7 +362,7 @@ def testCreateInts(self):
362362 )
363363
364364 def testSinglePoint (self ):
365- Pts = N .array ( (5 ,2 ), N .float64 )
365+ Pts = np .array ( (5 ,2 ), np .float64 )
366366 B = fromPoints (Pts )
367367 self .assertTrue (B [0 ,0 ] == 5.0 and
368368 B [0 ,1 ] == 2.0 and
@@ -442,7 +442,7 @@ def testSetCenter(self):
442442
443443
444444class testBBarray (wtc .WidgetTestCase ):
445- BBarray = N .array ( ( ((- 23.5 , 456 ), (56 , 532.0 )),
445+ BBarray = np .array ( ( ((- 23.5 , 456 ), (56 , 532.0 )),
446446 ((- 20.3 , 460 ), (54 , 465 )),
447447 ((- 23.5 , 456 ), (58 , 540.0 )),
448448 ((- 26.5 , 12 ), (56 , 532.0 )),
@@ -460,7 +460,7 @@ class testNullBBox(wtc.WidgetTestCase):
460460 B3 = BBox ( ( (1.0 , 2.0 ), (5.0 , 10.0 ) ) )
461461
462462 def testValues (self ):
463- self .assertTrue ( N .all (N .isnan (self .B1 )) )
463+ self .assertTrue ( np .all (np .isnan (self .B1 )) )
464464
465465 def testIsNull (self ):
466466 self .assertTrue ( self .B1 .IsNull )
@@ -496,7 +496,7 @@ class testInfBBox(wtc.WidgetTestCase):
496496 NB = NullBBox ()
497497
498498 def testValues (self ):
499- self .assertTrue ( N .all (N .isinf (self .B1 )) )
499+ self .assertTrue ( np .all (np .isinf (self .B1 )) )
500500
501501# def testIsNull(self):
502502# self.assertTrue( self.B1.IsNull )
0 commit comments