コード例 #1
0
ファイル: linalg.py プロジェクト: aeriksson/geogebra
 def __sub__(self, other):
     return Vector(API.subtract(self._vector, other._vector))
コード例 #2
0
ファイル: linalg.py プロジェクト: aeriksson/geogebra
 def __sub__(self, other):
     if isinstance(other, Number):
         return Matrix(API.scalarAdd(self._matrix, -other))
     else:
         return Matrix(API.subtract(self._matrix, other._matrix))