コード例 #1
0
ファイル: Matrix.py プロジェクト: KarolNi/VROOM-
 def m(self, b):
     return Matrix(self.array * asarray(b))
コード例 #2
0
ファイル: Matrix.py プロジェクト: KarolNi/VROOM-
 def asarray(self, t=None):
     if t is None:
         return self.array
     else:
         return asarray(self.array, t)
コード例 #3
0
ファイル: Matrix.py プロジェクト: KarolNi/VROOM-
 def __setitem__(self, index, value):
     value = asarray(value, self._typecode)
     if multiply.reduce(value.shape) == 1:
         value = value[0, 0]
     self.array[index] = value
コード例 #4
0
ファイル: Matrix.py プロジェクト: KarolNi/VROOM-
 def __setslice__(self, i, j, value):
     self.array[i:j] = asarray(squeeze(value), self._typecode)
コード例 #5
0
ファイル: Matrix.py プロジェクト: IanReid/ABFGP
 def __rmul__(self, other):
     aother = asarray(other)
     if len(aother.shape) == 0:
         return self._rc(aother*self.array)
     else:
         return self._rc(dot(aother, self.array))
コード例 #6
0
ファイル: Matrix.py プロジェクト: KarolNi/VROOM-
 def __imul__(self, other):
     aother = asarray(other)
     self.array = dot(self.array, aother)
     return self
コード例 #7
0
ファイル: Matrix.py プロジェクト: IanReid/ABFGP
 def asarray(self,t=None):
     if t is None:
         return self.array
     else:
         return asarray(self.array,t)
コード例 #8
0
ファイル: Matrix.py プロジェクト: dongqing7/ABFGP
 def __setitem__(self, index, value):
     value = asarray(value, self._typecode)
     self.array[index] = squeeze(value)
コード例 #9
0
ファイル: Matrix.py プロジェクト: IanReid/ABFGP
    def __setslice__(self, i, j, value): self.array[i:j] = asarray(squeeze(value),self._typecode)

    def __float__(self):
コード例 #10
0
ファイル: Matrix.py プロジェクト: IanReid/ABFGP
 def m(self,b):
     return Matrix(self.array * asarray(b))
コード例 #11
0
ファイル: Matrix.py プロジェクト: IanReid/ABFGP
 def __setitem__(self, index, value):
     value = asarray(value, self._typecode)
     self.array[index] = squeeze(value)
コード例 #12
0
ファイル: Matrix.py プロジェクト: IanReid/ABFGP
 def __imul__(self,other):
     aother = asarray(other)
     self.array = dot(self.array, aother)
     return self
コード例 #13
0
ファイル: Matrix.py プロジェクト: fxia22/ASM_xf
 def __setitem__(self, index, value):
     value = asarray(value, self._typecode)
     if multiply.reduce(value.shape) == 1:
         value = value[0,0]
     self.array[index] = value
コード例 #14
0
ファイル: Matrix.py プロジェクト: KarolNi/VROOM-
 def __mul__(self, other):
     aother = asarray(other)
     if len(aother.shape) == 0:
         return self._rc(self.array * aother)
     else:
         return self._rc(dot(self.array, aother))
コード例 #15
0
ファイル: Matrix.py プロジェクト: IanReid/ABFGP
 def __mul__(self, other):
     aother = asarray(other)
     if len(aother.shape) == 0:
         return self._rc(self.array*aother)
     else:
         return self._rc(dot(self.array, aother))
コード例 #16
0
ファイル: Matrix.py プロジェクト: KarolNi/VROOM-
 def __rmul__(self, other):
     aother = asarray(other)
     if len(aother.shape) == 0:
         return self._rc(aother * self.array)
     else:
         return self._rc(dot(aother, self.array))
コード例 #17
0
ファイル: Matrix.py プロジェクト: mcyril/ravel-ftn
import string