Commit d304f819 authored by Martin Reinecke's avatar Martin Reinecke

try to support operator subtraction

parent d1901ab5
......@@ -57,6 +57,11 @@ class Operator(NiftyMetaBase()):
return NotImplemented
return _OpSum(self, x)
def __sub__(self, x):
if not isinstance(x, Operator):
return NotImplemented
return _OpSum(self, -x)
def __pow__(self, power):
if not np.isscalar(power):
return NotImplemented
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment