-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
00 - Bug41 - Static typingcomponent: numpy.stringsString dtypes and functionsString dtypes and functions
Description
Describe the issue:
The below code runs fine, but does not type check:
Reproduce the code example:
import numpy as np
arr = np.array("abc", dtype=np.dtypes.StringDType)
arr += "def"
print(arr)Error message:
(.venv) C:\Code\project>mypy bug.py
bug.py:3: error: Module has no attribute "StringDType" [attr-defined]
Found 1 error in 1 file (checked 1 source file)Python and NumPy Versions:
2.0.0
3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)]
Runtime Environment:
(not relevant)
Context for the issue:
No response
Metadata
Metadata
Assignees
Labels
00 - Bug41 - Static typingcomponent: numpy.stringsString dtypes and functionsString dtypes and functions