Skip to content
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

Use isinstance over is_foo_dtype internally #14638

Merged
merged 5 commits into from
Dec 15, 2023

Conversation

mroeschke
Copy link
Contributor

Description

Internally IMO we should prefer isinstance over is_*_dtype when we know the input is a dtype instance in order to be stricter/faster that the is_*_dtype checks

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Dec 15, 2023
@mroeschke mroeschke requested a review from a team as a code owner December 15, 2023 00:57
@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit cbcfa67 into rapidsai:branch-24.02 Dec 15, 2023
67 checks passed
@mroeschke mroeschke deleted the cln/is_foo_dtype branch December 15, 2023 21:06
@mroeschke mroeschke mentioned this pull request Dec 15, 2023
3 tasks
rapids-bot bot pushed a commit that referenced this pull request Jan 19, 2024
Similar to #14638, use isinstance when we know we are checking a dtype instance

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #14641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants