Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPY002 legacy np.random.{method_name} call not triggering on np.random.random() #9861

Closed
jack-mcivor opened this issue Feb 6, 2024 · 2 comments · Fixed by #9862
Closed
Assignees
Labels
bug Something isn't working

Comments

@jack-mcivor
Copy link
Contributor

Using ruff v0.2.1

import numpy as np

np.random.random()
$ ruff check --isolated --select=NPY002 tmp.py

I expect this to trigger a violation - afaict np.random.random() is deprecated just like any other np.random.{method_name} call. Reference https://numpy.org/doc/stable/reference/random/legacy.html#functions-in-numpy-random

I'm not quite sure why it was left out of #2960

@jack-mcivor
Copy link
Contributor Author

I will try take

@charliermarsh
Copy link
Member

Looks like an oversight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants