Example #1
0
 def testConstructor3(self):
     "Test ArrayZ copy constructor"
     for i in range(self.array3.length()):
         self.array3[i] = complex(i, -i)
     arrayCopy = Array.ArrayZ(self.array3)
     self.failUnless(arrayCopy == self.array3)
Example #2
0
 def testConstructor2(self):
     "Test ArrayZ array constructor"
     na = np.arange(self.length, dtype=np.complex128)
     aa = Array.ArrayZ(na)
     self.failUnless(isinstance(aa, Array.ArrayZ))
Example #3
0
 def setUp(self):
     self.length = 5
     self.array3 = Array.ArrayZ(self.length)
Example #4
0
 def testConstructor0(self):
     "Test ArrayZ default constructor"
     a = Array.ArrayZ()
     self.failUnless(isinstance(a, Array.ArrayZ))
     self.failUnless(len(a) == 0)
Example #5
0
 def testConstructor0(self):
     "Test ArrayZ default constructor"
     a = Array.ArrayZ()
     self.assertTrue(isinstance(a, Array.ArrayZ))
     self.assertTrue(len(a) == 0)