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
Open sidebar
ift
NIFTy
Commits
06333722
Commit
06333722
authored
May 21, 2020
by
Philipp Arras
Browse files
Add unneccessary to Operator.imag
In order to make sure that the jacobian test can deal with complex positions
parent
ad0434e3
Pipeline
#75382
passed with stages
in 9 minutes and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/extra.py
View file @
06333722
...
...
@@ -219,7 +219,7 @@ def consistency_check(op, domain_dtype=np.float64, target_dtype=np.float64,
def
_get_acceptable_location
(
op
,
loc
,
lin
):
if
not
np
.
isfinite
(
lin
.
val
.
s_sum
()):
raise
ValueError
(
'Initial value must be finite'
)
dir
=
from_random
(
loc
.
domain
,
"normal"
)
dir
=
from_random
(
loc
.
domain
,
dtype
=
loc
.
dtype
)
dirder
=
lin
.
jac
(
dir
)
if
dirder
.
norm
()
==
0
:
dir
=
dir
*
(
lin
.
val
.
norm
()
*
1e-5
)
...
...
test/test_operators/test_adjoint.py
View file @
06333722
...
...
@@ -80,6 +80,8 @@ def testImaginizer(sp):
op
=
ift
.
Imaginizer
(
sp
)
ift
.
extra
.
consistency_check
(
op
,
np
.
complex128
,
np
.
float64
,
only_r_linear
=
True
)
loc
=
ift
.
from_random
(
op
.
domain
,
dtype
=
np
.
complex128
)
ift
.
extra
.
check_jacobian_consistency
(
op
,
loc
)
@
pmp
(
'sp'
,
_h_spaces
+
_p_spaces
+
_pow_spaces
)
...
...
Write
Preview
Supports
Markdown
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