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
d304f819
Commit
d304f819
authored
Sep 27, 2018
by
Martin Reinecke
Browse files
try to support operator subtraction
parent
d1901ab5
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/operator.py
View file @
d304f819
...
...
@@ -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
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