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
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
29b199ce
Commit
29b199ce
authored
Jun 22, 2018
by
Philipp Arras
Browse files
Cleanup
parent
03dfe083
Pipeline
#31635
failed with stages
in 3 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/field.py
View file @
29b199ce
...
...
@@ -737,8 +737,6 @@ class Field(object):
return
self
.
isEquivalentTo
(
other
)
COUNTER
=
0
for
op
in
[
"__add__"
,
"__radd__"
,
"__iadd__"
,
"__sub__"
,
"__rsub__"
,
"__isub__"
,
"__mul__"
,
"__rmul__"
,
"__imul__"
,
...
...
@@ -754,12 +752,6 @@ for op in ["__add__", "__radd__", "__iadd__",
if
isinstance
(
other
,
Field
):
if
other
.
_domain
!=
self
.
_domain
:
raise
ValueError
(
"domains are incompatible."
)
if
(
self
==
0
).
all
()
or
(
other
==
0
).
all
():
COUNTER
+=
1
print
(
"({}) zero Field detected"
.
format
(
COUNTER
))
print
(
"op = "
,
op
)
# import traceback
# traceback.print_stack()
tval
=
getattr
(
self
.
val
,
op
)(
other
.
val
)
return
self
if
tval
is
self
.
val
else
Field
(
self
.
_domain
,
tval
)
...
...
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