summaryrefslogtreecommitdiff
path: root/numpy/core/_exceptions.py
Commit message (Collapse)AuthorAgeFilesLines
* API: Always reject equal/not_equal for datetime/timedelta mixSebastian Berg2022-12-011-14/+13
| | | | | | This allows correctly cathing the error, also adjust the the NoLoop error is used for the the "binary no loop error". For now, I think I may want to keep the casting error distinct.
* API: Add new exceptions module and move exception exposed via numericSebastian Berg2022-11-301-107/+0
| | | | This means moving ComplexWarning, TooHardError, and AxisError.
* MAINT: Move set_module to numpy.core to use without C importSebastian Berg2022-11-241-1/+1
|
* DOC: adding docstring to TooHardError class (#21471)Angéllica Araujo2022-06-011-0/+9
|
* ENH: Add the `axis` and `ndim` attributes to `np.AxisError` (#19459)Bas van Beek2021-07-201-11/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds the new axis and ndim attributes to the np.AxisError class, an addition inspired by similar changes introduced to AttributeError in Python 3.10. It also provided an excuse to update the classes' documentation and tests, both of which were previously rather lacking. * ENH: Add the `axis` and `ndim` attributes to `np.AxisError` * MAINT: Let the new `AxisError` attributes survive pickling * DOC: Update the `AxisError` documentation * TST: Update the `AxisError` tests * DOC: Add a release note * MAINT: Improve the description of `AxisError`s overloaded constructor * TST: Fix a few typing test failures * DOC: Clarify a fix a few parts of the `AxisError` docstrings Co-Authored-By: Eric Wieser <425260+eric-wieser@users.noreply.github.com> * DOC: Reguide fix * DOC: Replace `versionadded` with `versionchanged` Co-authored-by: Eric Wieser <wieser.eric@gmail.com> * DOC: Mention that `AxisError` is a `ValueError` and `IndexError` subclass Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net> * ENH: Delay assembling of the error message until `__str__` is called Co-Authored-By: Eric Wieser <425260+eric-wieser@users.noreply.github.com> * DOC: Update the `AxisError` string representation in its docstring * DOC: Update `versionadded`-related information Co-Authored-By: Eric Wieser <425260+eric-wieser@users.noreply.github.com> * DOC: Fix sphinx warnings Co-authored-by: Eric Wieser <425260+eric-wieser@users.noreply.github.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* MAINT: use super() as described by PEP 3135Mike Taves2021-03-191-1/+1
|
* BUG: ensure _UFuncNoLoopError can be pickled (#17377)bernie gray2020-11-181-2/+0
| | | | | | | | | * BUG: ensure _UFuncNoLoopError can be pickled; closes #16490 * update quickstart.rst * add round trip pickle test * move _ArrayMemoryError picking test
* MAINT: Clean up, mostly unused imports.Warren Weckesser2020-01-231-1/+0
|
* Merge pull request #14459 from eric-wieser/MemoryError-sizeAllan Haldane2019-09-091-2/+50
|\ | | | | ENH: Print the amount of memory that would be used by a failed allocation
| * ENH: Print the amount of memory that would be used by a failed allocationEric Wieser2019-09-081-2/+50
| |
* | ENH: Override module in private error classes displayed as baseSebastian Berg2019-09-051-0/+1
|/ | | | | | While IPython seems to not print the module information (or only prints qualname), python adds the full module, so it needs to be overridden to not be printed on error.
* BUG: Prevent unsafe string concatenationEric Wieser2019-06-051-0/+16
| | | | | | | This did not handle exceptions correctly. Changed to use python to format the exception like all the others in this file. This also adds quotes around the ufunc name.
* ENH:improve memory error message by adding shape and data type(#13225)Mircea Akos Bruma2019-04-231-3/+1
|
* ENH: improve memory error message by adding shape and data type (#13225)Mircea Akos Bruma2019-04-171-0/+14
|
* MAINT: Move exceptions from core._internal to core._exceptionsEric Wieser2019-04-131-0/+25
|
* DEV: cleanup imports and some assignments (from LGTM)mattip2019-03-171-2/+0
|
* ENH: Use richer exception types for ufunc type resolution errorsEric Wieser2019-01-131-0/+100
This might make it easier for users to implement `__array_ufunc__` with custom casting behavior. The motivation for this was to be able to deprecate the broken casting behavior in `np.clip`, without resorting to inspecting error strings. This also removes the need for gh-12178