-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: mypy --follow-imports error or skip crashes with numpy 2.0.0 #26720
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
Thanks for the bug report @tomsilver. I can reproduce the problem, I'm just not sure what to make of it yet. An "internal error" from Mypy with no other info to go on looks like a Mypy bug indeed, even if it's triggered by some issue in a numpy |
@vasudev13 that is a different error. You need to upgrade your installed pandas version; 2.2.2 is the first version that is compatible with numpy 2.0 |
Weird try, but if I add |
Thanks for opening a Mypy issue (python/mypy#17396) for this @tomsilver. |
Closing this issue, since it's now confirmed that it's a Mypy bug and there is nothing to fix for this on the NumPy side. Thanks again @tomsilver |
Describe the issue:
This may be a mypy bug, but it only emerged with
numpy==2.0.0
.Steps to reproduce:
pip install numpy mypy
echo "import numpy" > test.py
mypy test.py --follow-imports error
The crash is shown below. Notes:
numpy==1.26.4
mypy test.py --follow-imports skip
mypy test.py --follow-imports normal
Reproduce the code example:
Error message:
Python and NumPy Versions:
2.0.0
3.10.6 (main, Dec 5 2022, 17:11:59) [Clang 13.1.6 (clang-1316.0.21.2.5)]
Runtime Environment:
[{'numpy_version': '2.0.0',
'python': '3.10.6 (main, Dec 5 2022, 17:11:59) [Clang 13.1.6 '
'(clang-1316.0.21.2.5)]',
'uname': uname_result(system='Darwin', node='Toms-MacBook-Pro-4.local', release='21.6.0', version='Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000', machine='arm64')},
{'simd_extensions': {'baseline': ['NEON', 'NEON_FP16', 'NEON_VFPV4', 'ASIMD'],
'found': ['ASIMDHP'],
'not_found': ['ASIMDFHM']}},
{'architecture': 'neoversen1',
'filepath': '/Users/tom/Desktop/venv/lib/python3.10/site-packages/numpy/.dylibs/libscipy_openblas64_.dylib',
'internal_api': 'openblas',
'num_threads': 10,
'prefix': 'libscipy_openblas',
'threading_layer': 'pthreads',
'user_api': 'blas',
'version': '0.3.27'}]
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: