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

Skip to content

Tracking issue: Python API cleanup for NumPy 2.0 (NEP 52) #23999

Closed
@rgommers

Description

@rgommers

This tracking issue is meant to track the status and tasks of the Python API cleanup project for NumPy 2.0 (NEP 52, currently in draft status). Note: this is currently far from a complete plan, I wanted to make a start though at tracking things and making them actionable.

This issue is probably also a good place to suggest additional APIs to move/remove/deprecate, or other open issues that are related and can be tackled.

As a way of working, it'd be good to check usages of the function/object one is working on in downstream libraries (SciPy, scikit-learn, pandas is a good start), clean those up, then remove the object in question from the API. That has at least two benefits:

  1. it avoids CI in those projects to start failing when the change lands in a NumPy nightly,
  2. it gives a good sense of how easy it is to replace the usage with the recommended replacement

Cleaning up the main namespace

Cleaning up the submodule structure

Reducing the number of ways to select dtypes

Actionable:

Cleaning up the niche methods on numpy.ndarray

There are the ones listed in the NEP right now

  • .setitem
  • .newbyteorder
  • .ptp

Doing the above ones will give a better idea about the amount of effort involved, and may help with then identifying a next set.

Documentation

Metadata

Metadata

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions