diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-08-17 17:07:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 17:07:02 +0300 |
commit | 67c7066353534eeac8054f0deb75dc5923c6dc20 (patch) | |
tree | 81aa702e77fb1981eb918a557ae286e22c12a02e /doc/release | |
parent | adf50b93d76fa55d03ccbc4910602cda23b32c7d (diff) | |
parent | f89486c781634ad53e7107b35fc3899822734908 (diff) | |
download | numpy-67c7066353534eeac8054f0deb75dc5923c6dc20.tar.gz |
Merge pull request #17029 from seberg/cast-error-return
MAINT: Add error return to all casting functionality and NpyIter
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/upcoming_changes/17029.compatibility.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/17029.compatibility.rst b/doc/release/upcoming_changes/17029.compatibility.rst new file mode 100644 index 000000000..69069ce18 --- /dev/null +++ b/doc/release/upcoming_changes/17029.compatibility.rst @@ -0,0 +1,14 @@ +Casting errors interrupt Iteration +---------------------------------- +When iterating while casting values, an error may stop the iteration +earlier than before. In any case, a failed casting operation always +returned undefined, partial results. Those may now be even more +undefined and partial. +For users of the ``NpyIter`` C-API such cast errors will now +cause the `iternext()` function to return 0 and thus abort +iteration. +Currently, there is no API to detect such an error directly. +It is necessary to check ``PyErr_Occurred()``, which +may be problematic in combination with ``NpyIter_Reset``. +These issues always existed, but new API could be added +if required by users. |