8000 ENH: Add the `axis` and `ndim` attributes to `np.AxisError` by BvB93 · Pull Request #19459 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Add the axis and ndim attributes to np.AxisError #19459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: Mention that AxisError is a ValueError and IndexError subc…
…lass

Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
  • Loading branch information
BvB93 and seberg committed Jul 19, 2021
commit 16964aeecf841bddc8eb1a01c918e678fcf4ea0a
3 changes: 2 additions & 1 deletion numpy/core/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ class TooHardError(RuntimeError):
class AxisError(ValueError, IndexError):
"""Axis supplied was invalid.

Raised whenever an ``axis`` parameter is specified that is larger than
A `ValueError` and `IndexError` subclass raised whenever an
``axis`` parameter is specified that is larger than
the number of array dimensions.

.. versionchanged:: 1.22
Expand Down
0