Commit 94e7b58a authored by Philipp Arras's avatar Philipp Arras
Browse files

Add abs to Operator

parent 672bfd44
......@@ -218,6 +218,9 @@ class Operator(metaclass=NiftyMeta):
return NotImplemented
return _OpSum(self, -x)
def __abs__(self):
return self.ptw("abs")
def __pow__(self, power):
if not (np.isscalar(power) or power.jac is None):
return NotImplemented
......
Supports Markdown
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