Commit 237b64d0 authored by Sebastian Hutschenreuter's avatar Sebastian Hutschenreuter
Browse files

fixed power linearization

parent d1901ab5
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
import numpy as np import numpy as np
...@@ -104,7 +105,7 @@ class Linearization(object): ...@@ -104,7 +105,7 @@ class Linearization(object):
def __pow__(self, power): def __pow__(self, power):
if not np.isscalar(power): if not np.isscalar(power):
return NotImplemented return NotImplemented
return**power, (self._jac**(power-1)).scale(power)) return**power, makeOp(self._val**(power-1)).scale(power)(self._jac))
def inverse(self): def inverse(self):
return, makeOp(-1./(self._val**2))(self._jac)) return, makeOp(-1./(self._val**2))(self._jac))
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