Commit 5fa0cee4 authored by Martin Reinecke's avatar Martin Reinecke

silence unnecessary warnings

parent 20577a56
Pipeline #77103 passed with stages
in 13 minutes and 10 seconds
......@@ -147,6 +147,8 @@ class DiagonalOperator(EndomorphicOperator):
if self._complex and (trafo & self.ADJOINT_BIT):
xdiag = xdiag.conj()
if trafo & self.INVERSE_BIT:
# dividing by zero is OK here, we can deal with infinities
with np.errstate(divide='ignore'):
xdiag = 1./xdiag
return self._from_ldiag((), xdiag)
......
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