Skip to content

DOC: NaN and NAN are listed as aliases of nan in version 2.0 despite being removed. #26732

@nicholas-mati

Description

@nicholas-mati

Issue with current documentation:

The documentation currently contains the sentence: "NaN and NAN are aliases of nan." This appears to not be the case; attempting to reference np.NaN will result in the following error message:

    394     raise AttributeError(__former_attrs__[attr])
    396 if attr in __expired_attributes__:
--> 397     raise AttributeError(
    398         f"`np.{attr}` was removed in the NumPy 2.0 release. "
    399         f"{__expired_attributes__[attr]}"
    400     )
    402 if attr == "chararray":
    403     warnings.warn(
    404         "`np.chararray` is deprecated and will be removed from "
    405         "the main namespace in the future. Use an array with a string "
    406         "or bytes dtype instead.", DeprecationWarning, stacklevel=2)

AttributeError: `np.NaN` was removed in the NumPy 2.0 release. Use `np.nan` instead.

Idea or request for content:

Remove the sentence "NaN and NAN are aliases of nan" from https://numpy.org/doc/stable/reference/constants.html for version 2.0 (stable).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions