-
-
Notifications
You must be signed in to change notification settings - Fork 141
is_numeric_dtype not considering Index as a valid type #415
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
Need to expand definition of
Need to add more tests to Maybe @bashtage can have a look, although this should be pretty straightforward to do. Just have to add lots of tests. |
Sir can you please tell if this test is correct for pd.Index. |
Yes, it appears to be so. If you work on this, you should add a lot of tests for all the other functions there, as well as the other types that those functions accept. Test locally before creating a PR. |
Yes sir |
Sir I ran test on my local system it is working with no issues and for |
Yes, and for the other functions that are in What you should do is modify each of the single test functions that exist for each of the functions that are in there. E.g., one for |
Thanks sir I'll do it |
Sir just a small question for |
For |
Thanks Sir |
Describe the bug
As stated in the docs, the
is_numeric_dtype
function accepts Dtypes, Arrays, and Index as well.https://pandas.pydata.org/docs/reference/api/pandas.api.types.is_numeric_dtype.html?highlight=example
However, the typings are only contemplating
_ArrayOrDtype
pandas-stubs/pandas-stubs/core/dtypes/common.pyi
Line 50 in 001c0af
To Reproduce
pandas
example that is not properly checked by the stubs.Show the error message received from that type checker while checking your example.
(I put one type per line to make the output more readable)
Please complete the following information:
OS: MacOS M1
OS Version Ventura 13.0
python version: 3.9.12
version of type checker: mypy 0.982 (compiled: yes)
version of installed pandas-stubs
pandas==1.5.1
pandas-stubs==1.5.1.221024
The text was updated successfully, but these errors were encountered: