Exemple #1
0
 def __new__(subtype, data, dtype=None, copy=True):
     arr = array(data, dtype=dtype, copy=copy)
     shape = arr.shape
     ret = ndarray.__new__(subtype, shape, arr.dtype,
                             buffer=arr,
                             order=True)
     return ret
Exemple #2
0
 def __new__(subtype, shape, dtype):
     self = ndarray.__new__(subtype, shape, dtype)
     self.id = 'subtype'
     return self