Example #1
0
 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
Example #2
0
 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
Example #3
0
    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])
Example #4
0
 def __init__(self,*args):
    UserArray.__init__(self,*args)
Example #5
0
import string