You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indicate which type checker you are using (mypy or pyright).
I am using MyPy.
Show the error message received from that type checker while checking your example.
Argument "na_value" to "to_numpy" of "BaseMaskedArray" has incompatible type "signedinteger[_32Bit]"; expected "str | bytes | date | datetime | timedelta | <7 more items> | complex"
Please complete the following information:
OS: Windows
OS Version: 11
python version: 3.11.11
version of type checker: 1.15.0
version of installed pandas-stubs: 2.2.3.250308
The text was updated successfully, but these errors were encountered:
Thanks for the report!
This is indeed a known issue because Scalar type does not contain any of the numpy variations (np.int, np.float, ...).
It is currently up to consideration with @Dr-Irv because including those would have a large impact over the codebase but this may be the right way to go.
Describe the bug
Calling
to_numpy
withna_value
set to a NumPy type gives a type error. This works at runtime.To Reproduce
Provide a minimal runnable
pandas
example that is not properly checked by the stubs.Indicate which type checker you are using (
mypy
orpyright
).I am using MyPy.
Show the error message received from that type checker while checking your example.
Please complete the following information:
pandas-stubs
: 2.2.3.250308The text was updated successfully, but these errors were encountered: