summaryrefslogtreecommitdiff
path: root/numpy/lib/user_array.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/user_array.py')
-rw-r--r--numpy/lib/user_array.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/user_array.py b/numpy/lib/user_array.py
index 62398fc3c..f1510a7b1 100644
--- a/numpy/lib/user_array.py
+++ b/numpy/lib/user_array.py
@@ -34,7 +34,7 @@ class container(object):
self.array = array(data, dtype, copy=copy)
def __repr__(self):
- if len(self.shape) > 0:
+ if self.ndim > 0:
return self.__class__.__name__ + repr(self.array)[len("array"):]
else:
return self.__class__.__name__ + "(" + repr(self.array) + ")"
@@ -183,7 +183,7 @@ class container(object):
return self._rc(invert(self.array))
def _scalarfunc(self, func):
- if len(self.shape) == 0:
+ if self.ndim == 0:
return func(self[0])
else:
raise TypeError(