Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Discussion: uint / int_ / float_ / complex_ in NEP 52 #24743

Closed
@jakevdp

Description

@jakevdp

Pulling-out a discussion of #24376 (comment), which is buried in a long thread.

I have been working on updating JAX for compatibility with NEP 52, and the inconsistency of treatment of default-width dtypes (uint, int_, float_, complex_) is something I'm finding confusing.

For consistency, I think either all four should be present in NumPy 2.0, or all four should be removed. The current state, where uint and int_ are present, but float_ and complex_ are not, is inconsistent and confusing.

I understand the argument about platform-dependence of integer dtypes and non-platform dependence of inexact dtypes. I understand the goal of eliminating unnecessary aliases to types. But I think the consistency of having default-width dtype specifiers available for each dtype kind outweighs the cost of having overlapping names for those default types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    62 - Python APIChanges or additions to the Python API. Mailing list should usually be notified.Numpy 2.0 API Changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions