Skip to content
GitLab
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
b4477a95
Commit
b4477a95
authored
Mar 04, 2013
by
Marco Selig
Browse files
field.__len__ fixed: improved compatibility with numpy.ndarray.
parent
0a2a1c61
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty_core.py
View file @
b4477a95
...
...
@@ -6192,7 +6192,7 @@ class field(object):
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
def
__len__
(
self
):
return
int
(
self
.
dim
(
split
=
False
)
)
return
int
(
self
.
dim
(
split
=
True
)[
0
]
)
def
__getitem__
(
self
,
key
):
return
self
.
val
[
key
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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