def __sub__(self, other): """ Substraction (binary -) """ if isinstance(other, float): return MV(mv.addmf(ga, self._mv, other, operator.isub)) else: return MV(mv.addmm(ga, self._mv, other._mv, operator.isub))
def __add__(self, other): """ Addition (binary +) """ if isinstance(other, float): return MV(mv.addmf(ga, self._mv, other, operator.iadd)) else: return MV(mv.addmm(ga, self._mv, other._mv, operator.iadd))