Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
5fa0cee4
Commit
5fa0cee4
authored
Jun 23, 2020
by
Martin Reinecke
Browse files
silence unnecessary warnings
parent
20577a56
Pipeline
#77103
passed with stages
in 13 minutes and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/operators/diagonal_operator.py
View file @
5fa0cee4
...
@@ -147,7 +147,9 @@ class DiagonalOperator(EndomorphicOperator):
...
@@ -147,7 +147,9 @@ class DiagonalOperator(EndomorphicOperator):
if
self
.
_complex
and
(
trafo
&
self
.
ADJOINT_BIT
):
if
self
.
_complex
and
(
trafo
&
self
.
ADJOINT_BIT
):
xdiag
=
xdiag
.
conj
()
xdiag
=
xdiag
.
conj
()
if
trafo
&
self
.
INVERSE_BIT
:
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
)
return
self
.
_from_ldiag
((),
xdiag
)
def
process_sample
(
self
,
samp
,
from_inverse
):
def
process_sample
(
self
,
samp
,
from_inverse
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment