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
def __new__(subtype, shape, dtype): self = ndarray.__new__(subtype, shape, dtype) self.id = 'subtype' return self