Exemple #1
0
 def testNdempty(self):
     for dtp in (numpy.int16, numpy.int32, numpy.float32, numpy.complex128):
         dt = numpy.dtype(dtp)
         for shape in ((60,),(6,10),(4,3,5),(2,2,3,5)):
             a1 = ndarray_ext.empty(shape,dt)
             a2 = ndarray_ext.c_empty(shape,dt)
             self.assertEqual(shape,a1.shape)
             self.assertEqual(shape,a2.shape)
Exemple #2
0
 def testNdempty(self):
     for dtp in (numpy.int16, numpy.int32, numpy.float32, numpy.complex128):
         dt = numpy.dtype(dtp)
         for shape in ((60,),(6,10),(4,3,5),(2,2,3,5)):
             a1 = ndarray_ext.empty(shape,dt)
             a2 = ndarray_ext.c_empty(shape,dt)
             self.assertEqual(shape,a1.shape)
             self.assertEqual(shape,a2.shape)