diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-08-12 07:57:14 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2018-08-12 07:57:14 -0600 |
commit | 7204258b7dce4b51186ce607e32bf6a4c1a2e3bc (patch) | |
tree | d82af7fe9cbd857add48d061d01b7ec3d4234a01 /numpy/core/einsumfunc.py | |
parent | c0b4340c698c486e459a0a2c80706c78329c64fc (diff) | |
download | numpy-7204258b7dce4b51186ce607e32bf6a4c1a2e3bc.tar.gz |
MAINT: Make einsum optimize default to False.
False is the documented value and the value used in 1.14, but 1.15.0 was
turning optimization on when there were more than two arguments,
resulting in slowdowns for small matrices. This choice can be revisited
as the einsum optimization code matures.
Closes #11714.
Diffstat (limited to 'numpy/core/einsumfunc.py')
-rw-r--r-- | numpy/core/einsumfunc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/einsumfunc.py b/numpy/core/einsumfunc.py index 163f125c2..5b8689235 100644 --- a/numpy/core/einsumfunc.py +++ b/numpy/core/einsumfunc.py @@ -1319,8 +1319,8 @@ def einsum(*operands, **kwargs): """ - # Grab non-einsum kwargs; never optimize 2-argument case. - optimize_arg = kwargs.pop('optimize', len(operands) > 3) + # Grab non-einsum kwargs; do not optimize by default. + optimize_arg = kwargs.pop('optimize', False) # If no optimization, run pure einsum if optimize_arg is False: |