コード例 #1
0
ファイル: Matrix.py プロジェクト: KarolNi/VROOM-
 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
コード例 #2
0
ファイル: Matrix.py プロジェクト: IanReid/ABFGP
 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
コード例 #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])
コード例 #4
0
ファイル: pygeomath.py プロジェクト: eeue56/PyGeo2
 def __init__(self,*args):
    UserArray.__init__(self,*args)
コード例 #5
0
ファイル: Matrix.py プロジェクト: mcyril/ravel-ftn
import string