def __iadd__(self, other): check_basis(self.basis, other.basis) self._coeffs += other._coeffs return self
def __isub__(self, other): check_basis(self.basis, other.basis) self._coeffs -= other.coeffs return self
def __inner__(self, other): check_basis(self.basis, other.basis) # TODO: needs to check the gramian too return np.dot(self.coeffs, other.coeffs)