def __init__(self, data, typecode=None, copy=1, savespace=0): if type(data) is types.StringType: data = _convert_from_string(data) UserArray.__init__(self, data, typecode, copy, savespace) if len(self.array.shape) == 1: self.array.shape = (1, self.array.shape[0]) self.shape = self.array.shape
def __init__(self, data, typecode=None, copy=1, savespace=0): if type(data) is types.StringType: data = _convert_from_string(data) UserArray.__init__(self,data,typecode, copy, savespace) if len(self.array.shape) == 1: self.array.shape = (1,self.array.shape[0]) self.shape = self.array.shape
def __init__(self, point): UserArray.__init__(self, point, Numeric.Float) # define read-only attributes x, y, and z: if len(point) >= 1: UserArray.x = property(fget=lambda o=self: o.array[0]) if len(point) >= 2: UserArray.y = property(fget=lambda o=self: o.array[1]) if len(point) == 3: UserArray.z = property(fget=lambda o=self: o.array[2])
def __init__(self,*args): UserArray.__init__(self,*args)
import string