Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
32ac11af
Commit
32ac11af
authored
Jun 03, 2021
by
Philipp Arras
Browse files
Typo in docs
parent
c7bbcba3
Pipeline
#102834
passed with stages
in 13 minutes and 44 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/sugar.py
View file @
32ac11af
...
@@ -602,8 +602,8 @@ def is_operator(obj):
...
@@ -602,8 +602,8 @@ def is_operator(obj):
Note
Note
----
----
A simple `isinstance(obj, ift.Operator)` does give the expected
A simple `isinstance(obj, ift.Operator)` does
not
give the expected
result
result
because, e.g., :class:`~nifty7.field.Field` inherits from
because, e.g., :class:`~nifty7.field.Field` inherits from
:class:`~nifty7.operators.operator.Operator`.
:class:`~nifty7.operators.operator.Operator`.
"""
"""
return
isinstance
(
obj
,
Operator
)
and
obj
.
val
is
None
return
isinstance
(
obj
,
Operator
)
and
obj
.
val
is
None
...
@@ -619,10 +619,10 @@ def is_fieldlike(obj):
...
@@ -619,10 +619,10 @@ def is_fieldlike(obj):
Note
Note
----
----
A simple `isinstance(obj, ift.Field)` does give the expected
A simple `isinstance(obj, ift.Field)` does
not
give the expected
result
result
because users might have implemented another class which
because users might have implemented another class which
behaves field-like
behaves field-like
but is not an instance of
but is not an instance of
:class:`~nifty7.field.Field`. Also note that
:class:`~nifty7.
field.Field`. Also not that instances of
instances of
:class:`~nifty7.
linearization.Linearization` behave
:class:`~nifty7.linearization.Linearization` behave
field-like.
field-like.
"""
"""
return
isinstance
(
obj
,
Operator
)
and
obj
.
val
is
not
None
return
isinstance
(
obj
,
Operator
)
and
obj
.
val
is
not
None
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