Skip to content

BUG: numpy.alltrue is missing in numpy 2 and there is no lint or migration guide mention #26493

@illume

Description

@illume

Describe the issue:

numpy.alltrue and maybe other functions are missing, and there's no lint for it

Here it mentions that there should probably be a lint for it. #24306 (comment)

I don't think there's much appetite for a compat package and instead I think we're going to point people to ruff to lint and update their code. If there are cases where it's not straightforward to write code that works the same in both NumPy 1 and 2 we should look closer and see if it's possible to add code in a NumPy 1 bugfix release or in NumPy 2 to ease writing code that works in both versions.

Hi.

We noticed numpy.alltrue was gone, and there's no lint for it. Not sure if there's lints for other missing things... I didn't test for that.

pygame/pygame#4239 (comment)
There's quite a few hits for this function https://github.com/search?q=numpy+alltrue&type=code

Reproduce the code example:

import numpy
numpy.alltrue
  • Note this lint check does not find the missing function.
ruff check test/*.py --select NPY201

Error message:

No response

Python and NumPy Versions:

2.0.0rc2

Runtime Environment:

No response

Context for the issue:

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions