1
- #!/usr/bin/env python
1
+ #!/usr/bin/env python3
2
2
3
3
# Copyright Jim Bosch & Ankit Daftery 2010-2012.
4
4
# Distributed under the Boost Software License, Version 1.0.
@@ -19,7 +19,7 @@ def testNdzeros(self):
19
19
a1 = ndarray_ext .zeros (shape ,dt )
20
20
a2 = v .reshape (a1 .shape )
21
21
self .assertEqual (shape ,a1 .shape )
22
- self .assert_ ((a1 == a2 ).all ())
22
+ self .assertTrue ((a1 == a2 ).all ())
23
23
24
24
def testNdzeros_matrix (self ):
25
25
for dtp in (numpy .int16 , numpy .int32 , numpy .float32 , numpy .complex128 ):
@@ -28,7 +28,7 @@ def testNdzeros_matrix(self):
28
28
a1 = ndarray_ext .zeros_matrix (shape , dt )
29
29
a2 = numpy .matrix (numpy .zeros (shape , dtype = dtp ))
30
30
self .assertEqual (shape ,a1 .shape )
31
- self .assert_ ((a1 == a2 ).all ())
31
+ self .assertTrue ((a1 == a2 ).all ())
32
32
self .assertEqual (type (a1 ), type (a2 ))
33
33
34
34
def testNdarray (self ):
@@ -38,8 +38,8 @@ def testNdarray(self):
38
38
dt = numpy .dtype (dtp )
39
39
a1 = ndarray_ext .array (a )
40
40
a2 = ndarray_ext .array (a ,dt )
41
- self .assert_ ((a1 == v ).all ())
42
- self .assert_ ((a2 == v ).all ())
41
+ self .assertTrue ((a1 == v ).all ())
42
+ self .assertTrue ((a2 == v ).all ())
43
43
for shape in ((60 ,),(6 ,10 ),(4 ,3 ,5 ),(2 ,2 ,3 ,5 )):
44
44
a1 = a1 .reshape (shape )
45
45
self .assertEqual (shape ,a1 .shape )
0 commit comments