Commit b4477a95 authored by Marco Selig's avatar Marco Selig

field.__len__ fixed: improved compatibility with numpy.ndarray.

parent 0a2a1c61
......@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment