diff options
author | keremh <hallackerem@gmail.com> | 2020-04-24 12:30:28 +0300 |
---|---|---|
committer | keremh <hallackerem@gmail.com> | 2020-04-24 14:31:13 +0300 |
commit | ddf0191ea43d763c784dcb5f7ab937d8ef1ae0b0 (patch) | |
tree | a18617e807f9a9b2705ba6af46dd9006d5dffef0 /numpy/lib/shape_base.py | |
parent | 6d6df47fefdc503fbcffd8cb14a5daaa956ef220 (diff) | |
download | numpy-ddf0191ea43d763c784dcb5f7ab937d8ef1ae0b0.tar.gz |
ENH: Fix exception causes in four .py files
Diffstat (limited to 'numpy/lib/shape_base.py')
-rw-r--r-- | numpy/lib/shape_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index b7f1f16f2..c1b520f67 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -372,8 +372,8 @@ def apply_along_axis(func1d, axis, arr, *args, **kwargs): # invoke the function on the first item try: ind0 = next(inds) - except StopIteration: - raise ValueError('Cannot apply_along_axis when any iteration dimensions are 0') + except StopIteration as e: + raise ValueError('Cannot apply_along_axis when any iteration dimensions are 0') from None res = asanyarray(func1d(inarr_view[ind0], *args, **kwargs)) # build a buffer for storing evaluations of func1d. |