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
b14a66ba
Commit
b14a66ba
authored
Aug 12, 2018
by
Philipp Arras
Browse files
Add sum to operators
parent
68e9f355
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/operator.py
View file @
b14a66ba
...
...
@@ -52,6 +52,11 @@ class Operator(NiftyMetaBase()):
return
NotImplemented
return
_OpProd
(
self
,
x
)
def
__add__
(
self
,
x
):
if
not
isinstance
(
x
,
Operator
):
return
NotImplemented
return
_OpSum
.
make
([
self
,
x
])
def
apply
(
self
,
x
):
raise
NotImplementedError
...
...
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