summaryrefslogtreecommitdiff
path: root/numpy/lib/shape_base.py
diff options
context:
space:
mode:
authorwarren <warren.weckesser@gmail.com>2022-11-24 13:13:20 -0500
committerwarren <warren.weckesser@gmail.com>2022-11-24 13:13:20 -0500
commitabd9f12e3d7962551b248ceb1a3ba9828c660115 (patch)
tree670300aba48d2205fc157e36e905087470e9d406 /numpy/lib/shape_base.py
parent09154cfa6dea50a6ac24ae1062095c9e98026bbc (diff)
downloadnumpy-abd9f12e3d7962551b248ceb1a3ba9828c660115.tar.gz
MAINT: lib: A bit of flake8-driven clean up in shape_base.py
Diffstat (limited to 'numpy/lib/shape_base.py')
-rw-r--r--numpy/lib/shape_base.py8
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.