Skip to content

DOC: Numpy 2.0 release notes do not mention np.exceptions #25966

@ev-br

Description

@ev-br

Issue with current documentation:

In [2]: np.VisibleDeprecationWarning
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[2], line 1
----> 1 np.VisibleDeprecationWarning

File ~/repos/numpy/build-install/usr/lib/python3.11/site-packages/numpy/__init__.py:406, in __getattr__(attr)
    403     import numpy.char as char
    404     return char.chararray
--> 406 raise AttributeError("module {!r} has no attribute "
    407                      "{!r}".format(__name__, attr))

AttributeError: module 'numpy' has no attribute 'VisibleDeprecationWarning'

In [3]: np.__version__
Out[3]: '2.0.0.dev0+git20231224.284a2f0'

Idea or request for content:

My first reaction was to check the 2.0 release notes, but https://numpy.org/devdocs/release/2.0.0-notes.html does not mention np.exceptions at all.

Note that I'm not advocating to reinstate it, only to document it more prominently. I'm sure I've seen AxisError in the wild at least.

['AxisError',
 'ComplexWarning',
 'DTypePromotionError',
 'ModuleDeprecationWarning',
 'RankWarning',
 'TooHardError',
 'VisibleDeprecationWarning',

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions