Commit d996d12c authored by Philipp Frank's avatar Philipp Frank
Browse files

remove duplicate inverse

parent 34af9f25
......@@ -110,11 +110,11 @@ class Linearization(object):
def __truediv__(self, other):
if isinstance(other, Linearization):
return self.__mul__(other.inverse())
return self.__mul__(other.one_over())
return self.__mul__(1./other)
def __rtruediv__(self, other):
return self.inverse().__mul__(other)
return self.one_over().__mul__(other)
def __pow__(self, power):
if not np.isscalar(power):
......@@ -122,9 +122,6 @@ class Linearization(object):
def inverse(self):
return, makeOp(-1./(self._val**2))(self._jac))
def __mul__(self, other):
from .sugar import makeOp
if isinstance(other, Linearization):
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