| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
| |
This means moving ComplexWarning, TooHardError, and AxisError.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
* BUG: ensure _UFuncNoLoopError can be pickled; closes #16490
* update quickstart.rst
* add round trip pickle test
* move _ArrayMemoryError picking test
|
| |
|
|\
| |
| | |
ENH: Print the amount of memory that would be used by a failed allocation
|
| | |
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
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
|