You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENH: Add the axis and ndim attributes to np.AxisError (numpy#19459)
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 <[email protected]>
* DOC: Reguide fix
* DOC: Replace `versionadded` with `versionchanged`
Co-authored-by: Eric Wieser <[email protected]>
* DOC: Mention that `AxisError` is a `ValueError` and `IndexError` subclass
Co-Authored-By: Sebastian Berg <[email protected]>
* ENH: Delay assembling of the error message until `__str__` is called
Co-Authored-By: Eric Wieser <[email protected]>
* DOC: Update the `AxisError` string representation in its docstring
* DOC: Update `versionadded`-related information
Co-Authored-By: Eric Wieser <[email protected]>
* DOC: Fix sphinx warnings
Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Sebastian Berg <[email protected]>
0 commit comments