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
167959b3
Commit
167959b3
authored
Oct 03, 2018
by
Sebastian Hutschenreuter
Browse files
fixed __pow__ linearization
parents
237b64d0
d304f819
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/operator.py
View file @
167959b3
...
...
@@ -57,6 +57,11 @@ class Operator(NiftyMetaBase()):
return
NotImplemented
return
_OpSum
(
self
,
x
)
def
__sub__
(
self
,
x
):
if
not
isinstance
(
x
,
Operator
):
return
NotImplemented
return
_OpSum
(
self
,
-
x
)
def
__pow__
(
self
,
power
):
if
not
np
.
isscalar
(
power
):
return
NotImplemented
...
...
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