Skip to content
GitLab
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
237b64d0
Commit
237b64d0
authored
Oct 03, 2018
by
Sebastian Hutschenreuter
Browse files
fixed power linearization
parent
d1901ab5
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/linearization.py
View file @
237b64d0
from
__future__
import
absolute_import
,
division
,
print_function
import
numpy
as
np
...
...
@@ -104,7 +105,7 @@ class Linearization(object):
def
__pow__
(
self
,
power
):
if
not
np
.
isscalar
(
power
):
return
NotImplemented
return
self
.
new
(
self
.
_val
**
power
,
(
self
.
_
jac
**
(
power
-
1
)).
scale
(
power
))
return
self
.
new
(
self
.
_val
**
power
,
makeOp
(
self
.
_
val
**
(
power
-
1
)).
scale
(
power
)
(
self
.
_jac
)
)
def
inverse
(
self
):
return
self
.
new
(
1.
/
self
.
_val
,
makeOp
(
-
1.
/
(
self
.
_val
**
2
))(
self
.
_jac
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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