summaryrefslogtreecommitdiff
path: root/numpy/core/_internal.py
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2018-07-06 11:10:22 -0400
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2018-07-06 12:40:25 -0400
commit5c42cc31fa1ac6bfaed50d7069d7bb8e8fd8bb53 (patch)
treeea54a46186621588509b8645a559ba9aa7115cdb /numpy/core/_internal.py
parent739443679b50b43c34808b8fb767bac643fcd91d (diff)
downloadnumpy-5c42cc31fa1ac6bfaed50d7069d7bb8e8fd8bb53.tar.gz
MAINT: Speed up normalize_axis_tuple by about 30%
This is used in `np.moveaxis`, which is relatively slow. Timings change as follows: ``` import numpy as np from numpy.core.numeric import normalize_axis_tuple %timeit normalize_axis_tuple([0, 1, 2], 4, 'parrot') a = np.zeros((10,20,30)) %timeit np.moveaxis(a, [0,1,2], [2,1,0]) 100000 loops, best of 3: 5.56 µs per loop -> 4.17 µs ```
Diffstat (limited to 'numpy/core/_internal.py')
0 files changed, 0 insertions, 0 deletions