Skip to content
Snippets Groups Projects
Commit d304f819 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

try to support operator subtraction

parent d1901ab5
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,11 @@ class Operator(NiftyMetaBase()): ...@@ -57,6 +57,11 @@ class Operator(NiftyMetaBase()):
return NotImplemented return NotImplemented
return _OpSum(self, x) return _OpSum(self, x)
def __sub__(self, x):
if not isinstance(x, Operator):
return NotImplemented
return _OpSum(self, -x)
def __pow__(self, power): def __pow__(self, power):
if not np.isscalar(power): if not np.isscalar(power):
return NotImplemented return NotImplemented
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment