diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-07-15 07:54:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 07:54:08 -0500 |
commit | 6ca558fef265b6d286e1868a7bea5723a503a8ba (patch) | |
tree | cc369332e6d51a6f082eede36c75a37048e12562 | |
parent | a55db3d0a19866be03ebb5ef5c294720ac4b8560 (diff) | |
parent | 1171d5916ebbc34f6103aadb81505b5fbf9a034f (diff) | |
download | numpy-6ca558fef265b6d286e1868a7bea5723a503a8ba.tar.gz |
Merge pull request #14004 from seberg/issue-14000
ENH: Chain exception for typed item assignment
-rw-r--r-- | numpy/core/src/multiarray/arraytypes.c.src | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src index c586a0b1d..5d9e990e8 100644 --- a/numpy/core/src/multiarray/arraytypes.c.src +++ b/numpy/core/src/multiarray/arraytypes.c.src @@ -221,9 +221,7 @@ static int if (PySequence_NoString_Check(op)) { PyErr_SetString(PyExc_ValueError, "setting an array element with a sequence."); - Py_DECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); + npy_PyErr_ChainExceptionsCause(type, value, traceback); } else { PyErr_Restore(type, value, traceback); |