diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-07-08 17:38:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-08 17:38:33 +0100 |
commit | 4bed228adba88f9c5b85eaad308582db79a95b7b (patch) | |
tree | ed72644898d8026053cfcf82340beec53dd67cb0 /numpy/core/numeric.py | |
parent | 5c42cc31fa1ac6bfaed50d7069d7bb8e8fd8bb53 (diff) | |
download | numpy-4bed228adba88f9c5b85eaad308582db79a95b7b.tar.gz |
MAINT: Restore previous behavior on subclasses
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 a9fa3efe0..e5570791a 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1509,8 +1509,8 @@ def normalize_axis_tuple(axis, ndim, argname=None, allow_duplicate=False): -------- normalize_axis_index : normalizing a single scalar axis """ - # Speed-up most common cases. - if not isinstance(axis, (list, tuple)): + # Optimization to speed-up the most common cases. + if type(axis) not in (tuple, list): try: axis = [operator.index(axis)] except TypeError: |