Exemplo n.º 1
0
 def __rsub__(self, other):
     r = None
     if isinstance(other, MIArray):
         r = MIArray(ArrayMath.sub(other.array, self.array))
     else:
         r = MIArray(ArrayMath.sub(other, self.array))
     return r
Exemplo n.º 2
0
 def __rsub__(self, other):
     r = None
     if isinstance(other, MIArray):      
         r = MIArray(ArrayMath.sub(other.array, self.array))
     else:
         r = MIArray(ArrayMath.sub(other, self.array))
     return r
Exemplo n.º 3
0
 def __rsub__(self, other):
     if isinstance(other, MIArray):
         r = ArrayMath.sub(other.array, self.array)
     else:
         r = ArrayMath.sub(other, self.array)
     if r is None:
         raise ValueError('Dimension missmatch, can not broadcast!')
     return MIArray(r)
Exemplo n.º 4
0
 def __neg__(self):
     r = MIArray(ArrayMath.sub(0, self.array))
     return r
Exemplo n.º 5
0
 def __rsub__(self, other):
     other = MIArray.__value_other(self, other)
     r = ArrayMath.sub(other, self.array)
     if r is None:
         raise ValueError('Dimension missmatch, can not broadcast!')
     return MIArray(r)
Exemplo n.º 6
0
 def __neg__(self):
     r = MIArray(ArrayMath.sub(0, self.array))
     return r
Exemplo n.º 7
0
 def __rsub__(self, other):
     other = MIArray.__value_other(self, other)
     r = ArrayMath.sub(other, self.array)        
     if r is None:
         raise ValueError('Dimension missmatch, can not broadcast!')
     return MIArray(r)