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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index f8ca49429..b535cf846 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -1326,7 +1326,7 @@ def tensordot(a, b, axes=2):
N2 = 1
for axis in axes_a:
N2 *= as_[axis]
- newshape_a = (multiply.reduce([as_[ax] for ax in notin]), N2)
+ newshape_a = (int(multiply.reduce([as_[ax] for ax in notin])), N2)
olda = [as_[axis] for axis in notin]
notin = [k for k in range(ndb) if k not in axes_b]
@@ -1334,7 +1334,7 @@ def tensordot(a, b, axes=2):
N2 = 1
for axis in axes_b:
N2 *= bs[axis]
- newshape_b = (N2, multiply.reduce([bs[ax] for ax in notin]))
+ newshape_b = (N2, int(multiply.reduce([bs[ax] for ax in notin])))
oldb = [bs[axis] for axis in notin]
at = a.transpose(newaxes_a).reshape(newshape_a)