-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
numpy.typing._ufunc is slow when running in mypy #19719
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
Comments
Since Line 19 in 94010e3
In any case, I'm not sure there is anything we can do here from numpy's side. |
I'm also not sure what exactly is the place where exactly it gets slow. If you run the snippet in the issue description with
Me neither. I'm wondering if there is a possibility to have to make some annotations imports deferred. The full log message where it gets slow:
|
Hello dears, we are facing a similar issue when using numpy on freezed python (using cx-freeze).
Is this the same issue? |
Hi @fbaptista, This issue is about mypy (the static type checker) being slow when analyzing numpy. |
I see similar problems with |
python 3.9.7 |
For me, it finished in 36 seconds. mypy 0.910, numpy 1.21.2, python 3.9.0. Try waiting a bit longer? |
Oh, you are right, it terminates, but it takes almost 5 minutes on my machine. |
I'm noticing that mypy 0.931 seems to be much faster compared to 0.910 when running locally (i.e. a few seconds compared to ~1 min previously). Closing as the issue appears to be resolved and there isn't a lot that can be done about it here downstream anyway. |
Confirmed, now it finishes in 6 seconds on my machine. Thank you! |
Uh oh!
There was an error while loading. Please reload this page.
When running mypy on the code using the new numpy, it takes 30 seconds on my machine to produce a result. When running with
-v
flag, it shows that it freezes when importingnumpy.typing._ufunc
:Reproducing code example:
Error message:
not relevant, performance issue
NumPy/Python version information:
The text was updated successfully, but these errors were encountered: