Commit 990befe7 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'fix_division_warnings' into 'NIFTy_7'

silence unnecessary warnings

See merge request ift/nifty!547
parents d9a04481 5fa0cee4
......@@ -147,7 +147,9 @@ class DiagonalOperator(EndomorphicOperator):
if self._complex and (trafo & self.ADJOINT_BIT):
xdiag = xdiag.conj()
if trafo & self.INVERSE_BIT:
xdiag = 1./xdiag
# dividing by zero is OK here, we can deal with infinities
with np.errstate(divide='ignore'):
xdiag = 1./xdiag
return self._from_ldiag((), xdiag)
def process_sample(self, samp, from_inverse):
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