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
57f14dac
Commit
57f14dac
authored
Mar 11, 2020
by
Philipp Arras
Browse files
Merge branch 'add_one_over' into 'NIFTy_6'
added the one_over method to MutliField See merge request
!421
parents
35cf799b
c5386f78
Pipeline
#70651
passed with stages
in 18 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/multi_field.py
View file @
57f14dac
...
...
@@ -310,6 +310,9 @@ class MultiField(object):
res
[
key
]
=
-
val
if
neg
else
val
return
MultiField
.
from_dict
(
res
)
def
one_over
(
self
):
return
1
/
self
def
_binary_op
(
self
,
other
,
op
):
f
=
getattr
(
Field
,
op
)
if
isinstance
(
other
,
MultiField
):
...
...
Write
Preview
Supports
Markdown
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