Commit a1e34940 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

better behaviour for factor=0.

parent 60b965f2
Pipeline #23850 passed with stage
in 4 minutes and 24 seconds
......@@ -69,7 +69,10 @@ class ScalingOperator(EndomorphicOperator):
def inverse(self):
return ScalingOperator(1./self._factor, self._domain)
if self._factor!= 0.:
return ScalingOperator(1./self._factor, self._domain)
from .inverse_operator import InverseOperator
return InverseOperator(self)
def adjoint(self):
......@@ -81,5 +84,7 @@ class ScalingOperator(EndomorphicOperator):
def capability(self):
if self._factor==0.:
return self.TIMES | self.ADJOINT_TIMES
return (self.TIMES | self.ADJOINT_TIMES |
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