Skip to content

Commit 9aca665

Browse files
F3eQnxN3RriKmattip
andauthored
DOC: Fix references to AxisError in docstrings (#23918)
Reducing 3 warnings (ref: gh-13114) Co-authored-by: Matti Picus <[email protected]>
1 parent 30798d7 commit 9aca665

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎numpy/exceptions.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class AxisError(ValueError, IndexError):
103103
For compatibility with code written against older numpy versions, which
104104
raised a mixture of `ValueError` and `IndexError` for this situation, this
105105
exception subclasses both to ensure that ``except ValueError`` and
106-
``except IndexError`` statements continue to catch `AxisError`.
106+
``except IndexError`` statements continue to catch ``AxisError``.
107107
108108
.. versionadded:: 1.13
109109

‎numpy/lib/shape_base.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,8 @@ def expand_dims(a, axis):
531531
532532
.. versionchanged:: 1.18.0
533533
A tuple of axes is now supported. Out of range axes as
534-
described above are now forbidden and raise an `AxisError`.
534+
described above are now forbidden and raise an
535+
`~exceptions.AxisError`.
535536
536537
Returns
537538
-------

0 commit comments

Comments
 (0)