summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index d4d4045a0..896ad7f6a 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -1354,9 +1354,9 @@ def tensordot(a, b, axes=2):
a, b = asarray(a), asarray(b)
as_ = a.shape
- nda = len(a.shape)
+ nda = a.ndim
bs = b.shape
- ndb = len(b.shape)
+ ndb = b.ndim
equal = True
if na != nb:
equal = False
@@ -1461,7 +1461,7 @@ def roll(a, shift, axis=None):
else:
broadcasted = broadcast(shift, axis)
- if len(broadcasted.shape) > 1:
+ if broadcasted.ndim > 1:
raise ValueError(
"'shift' and 'axis' should be scalars or 1D sequences")
shifts = {ax: 0 for ax in range(a.ndim)}