diff options
author | Zuhair Ali-Khan <zaak7179@gmail.com> | 2020-06-04 00:28:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 08:28:58 +0300 |
commit | 489de42a9585615ca9962a83882896069357ab97 (patch) | |
tree | b9bbdd256032d1f0e95a70dac89c88f08d518d9d /numpy/core/fromnumeric.py | |
parent | 9ec27a3f5b81e6a7e808836410c9b6a73204c27e (diff) | |
download | numpy-489de42a9585615ca9962a83882896069357ab97.tar.gz |
MAINT: Chain some exceptions. (#16418)
* ENH: Chain extensions in numpy and numpy/core
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Zuhair Ali-Khan <54608785+zalikh2@users.noreply.github.com>
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 0c63bcf73..2b88ccedf 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -536,9 +536,9 @@ def put(a, ind, v, mode='raise'): """ try: put = a.put - except AttributeError: + except AttributeError as e: raise TypeError("argument 1 must be numpy.ndarray, " - "not {name}".format(name=type(a).__name__)) + "not {name}".format(name=type(a).__name__)) from e return put(ind, v, mode=mode) |