diff options
author | Daniel Smith <dgasmith@icloud.com> | 2017-07-18 10:35:51 -0400 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2017-07-18 09:35:51 -0500 |
commit | e3b5e88ae6c0b546dd63b869f32427553ad36e57 (patch) | |
tree | 2b3fedf2d72ca8864eabf6731773c14704a26ba7 /numpy/core/numeric.py | |
parent | 80e4105611359557191e29ccd3e9cb4fd5840893 (diff) | |
download | numpy-e3b5e88ae6c0b546dd63b869f32427553ad36e57.tar.gz |
ENH: Einsum calls BLAS if it advantageous to do so (#9425)
* Einsum now optionally uses BLAS
* The einsum call is now optimized by default
* cleans up the dot logic
* MAINT: Correct spelling, tranpose <- transpose.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 4 |
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) |