diff options
author | warren <warren.weckesser@gmail.com> | 2022-11-24 13:13:20 -0500 |
---|---|---|
committer | warren <warren.weckesser@gmail.com> | 2022-11-24 13:13:20 -0500 |
commit | abd9f12e3d7962551b248ceb1a3ba9828c660115 (patch) | |
tree | 670300aba48d2205fc157e36e905087470e9d406 /numpy/lib | |
parent | 09154cfa6dea50a6ac24ae1062095c9e98026bbc (diff) | |
download | numpy-abd9f12e3d7962551b248ceb1a3ba9828c660115.tar.gz |
MAINT: lib: A bit of flake8-driven clean up in shape_base.py
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/shape_base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index b8b3ebaad..3cb4dc19c 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -1,9 +1,7 @@ import functools import numpy.core.numeric as _nx -from numpy.core.numeric import ( - asarray, zeros, outer, concatenate, array, asanyarray - ) +from numpy.core.numeric import asarray, zeros, array, asanyarray from numpy.core.fromnumeric import reshape, transpose from numpy.core.multiarray import normalize_axis_index from numpy.core import overrides @@ -374,7 +372,7 @@ def apply_along_axis(func1d, axis, arr, *args, **kwargs): # invoke the function on the first item try: ind0 = next(inds) - except StopIteration as e: + except StopIteration: raise ValueError( 'Cannot apply_along_axis when any iteration dimensions are 0' ) from None @@ -1043,6 +1041,7 @@ def dsplit(ary, indices_or_sections): raise ValueError('dsplit only works on arrays of 3 or more dimensions') return split(ary, indices_or_sections, 2) + def get_array_prepare(*args): """Find the wrapper for the array with the highest priority. @@ -1055,6 +1054,7 @@ def get_array_prepare(*args): return wrappers[-1][-1] return None + def get_array_wrap(*args): """Find the wrapper for the array with the highest priority. |