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)
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))
def setUp(self): self.length = 5 self.array3 = Array.ArrayZ(self.length)
def testConstructor0(self): "Test ArrayZ default constructor" a = Array.ArrayZ() self.failUnless(isinstance(a, Array.ArrayZ)) self.failUnless(len(a) == 0)
def testConstructor0(self): "Test ArrayZ default constructor" a = Array.ArrayZ() self.assertTrue(isinstance(a, Array.ArrayZ)) self.assertTrue(len(a) == 0)