1- #!/usr/bin/env python
1+ #!/usr/bin/env python3
22
33# Copyright Jim Bosch & Ankit Daftery 2010-2012.
44# Distributed under the Boost Software License, Version 1.0.
@@ -19,7 +19,7 @@ def testNdzeros(self):
1919 a1 = ndarray_ext .zeros (shape ,dt )
2020 a2 = v .reshape (a1 .shape )
2121 self .assertEqual (shape ,a1 .shape )
22- self .assert_ ((a1 == a2 ).all ())
22+ self .assertTrue ((a1 == a2 ).all ())
2323
2424 def testNdzeros_matrix (self ):
2525 for dtp in (numpy .int16 , numpy .int32 , numpy .float32 , numpy .complex128 ):
@@ -28,7 +28,7 @@ def testNdzeros_matrix(self):
2828 a1 = ndarray_ext .zeros_matrix (shape , dt )
2929 a2 = numpy .matrix (numpy .zeros (shape , dtype = dtp ))
3030 self .assertEqual (shape ,a1 .shape )
31- self .assert_ ((a1 == a2 ).all ())
31+ self .assertTrue ((a1 == a2 ).all ())
3232 self .assertEqual (type (a1 ), type (a2 ))
3333
3434 def testNdarray (self ):
@@ -38,8 +38,8 @@ def testNdarray(self):
3838 dt = numpy .dtype (dtp )
3939 a1 = ndarray_ext .array (a )
4040 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 ())
4343 for shape in ((60 ,),(6 ,10 ),(4 ,3 ,5 ),(2 ,2 ,3 ,5 )):
4444 a1 = a1 .reshape (shape )
4545 self .assertEqual (shape ,a1 .shape )
0 commit comments