Skip to content

BUG: Add is_any_real_numeric_dtype to solve discrepancy between Index.is_numeric() and is_numeric_dtype() #51160

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

Merged
merged 22 commits into from
Feb 7, 2023

Conversation

ABCPAN-rank
Copy link
Contributor

@ABCPAN-rank ABCPAN-rank commented Feb 4, 2023

@phofl phofl changed the title BUG: Addition a new function to solve Discrepancy between is_numeric and is_numeric_dtype BUG: Add is_any_real_numeric_dtype to solve discrepancy between Index.is_numeric() and is_numeric_dtype() Feb 4, 2023
@phofl phofl added this to the 2.0 milestone Feb 4, 2023
@ABCPAN-rank ABCPAN-rank changed the title BUG: Add is_any_real_numeric_dtype to solve discrepancy between Index.is_numeric() and is_numeric_dtype() BUG: Add is_any_real_numeric_dtype to solve discrepancy between Index.is_numeric() and is_numeric_dtype() Feb 4, 2023
@phofl
Copy link
Member

phofl commented Feb 4, 2023

Could you check the failing builds?

@phofl phofl requested a review from mroeschke February 6, 2023 20:05
@@ -1219,9 +1219,9 @@ def is_numeric_dtype(arr_or_dtype) -> bool:
)


def is_any_numeric_dtype(arr_or_dtype) -> bool:
def is_any_real_numeric_dtype(arr_or_dtype) -> bool:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phofl on the off chance someone is actually using this, maybe it's safer if we make an alias is_any_real_numeric_dtype = is_any_numeric_dtype the "public" version?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was only added a couple of days ago, it's especially in no release yet, so I think we are good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay gotcha. Fine to change then

@phofl phofl merged commit 7f2f465 into pandas-dev:main Feb 7, 2023
@phofl
Copy link
Member

phofl commented Feb 7, 2023

thx @ABCPAN-rank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Discrepancy between .is_numeric() and is_numeric_dtype for bool Index
3 participants