Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
1d207bea
Commit
1d207bea
authored
Jul 17, 2013
by
Marco Selig
Browse files
recursion bug in invertible_operator fixed.
parent
6d704d5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty_tools.py
View file @
1d207bea
...
...
@@ -189,6 +189,8 @@ class invertible_operator(operator):
## apply operator
if
(
self
.
imp
):
A
=
self
.
_inverse_multiply
elif
(
id
(
self
.
inverse_times
)
==
id
(
invertible_operator
.
inverse_times
)):
## avoid infinite recursion
A
=
super
(
invertible_operator
,
self
).
inverse_times
else
:
A
=
self
.
inverse_times
x_
,
convergence
=
conjugate_gradient
(
A
,
x_
,
W
=
W
,
spam
=
spam
,
reset
=
reset
,
note
=
note
)(
x0
=
x0
,
tol
=
tol
,
clevel
=
clevel
,
limii
=
limii
)
...
...
@@ -255,6 +257,8 @@ class invertible_operator(operator):
## apply operator
if
(
self
.
imp
):
A
=
self
.
_multiply
elif
(
id
(
self
.
times
)
==
id
(
invertible_operator
.
times
)):
## avoid infinite recursion
A
=
super
(
invertible_operator
,
self
).
times
else
:
A
=
self
.
times
x_
,
convergence
=
conjugate_gradient
(
A
,
x_
,
W
=
W
,
spam
=
spam
,
reset
=
reset
,
note
=
note
)(
x0
=
x0
,
tol
=
tol
,
clevel
=
clevel
,
limii
=
limii
)
...
...
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