コード例 #1
0
ファイル: vector.py プロジェクト: SpuqTeam/spuq
 def __iadd__(self, other):
     check_basis(self.basis, other.basis)
     self._coeffs += other._coeffs
     return self
コード例 #2
0
ファイル: vector.py プロジェクト: SpuqTeam/spuq
 def __isub__(self, other):
     check_basis(self.basis, other.basis)
     self._coeffs -= other.coeffs
     return self
コード例 #3
0
ファイル: vector.py プロジェクト: SpuqTeam/spuq
 def __inner__(self, other):
     check_basis(self.basis, other.basis)
     # TODO: needs to check the gramian too
     return np.dot(self.coeffs, other.coeffs)