Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MNT: Use isinstance() instead of comparing type() #28984

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 2 commits into from
May 16, 2025

Conversation

DimitriPapadopoulos
Copy link
Contributor

Not entirely equivalent, in case of derived classes. Yet, I believe the new behaviour is the desired behaviour.

@DimitriPapadopoulos DimitriPapadopoulos changed the title MNT: Use ininstance() instead of comparing type() MNT: Use isinstance() instead of comparing type() May 16, 2025
Not entirely equivalent, in case of derived classes. Yet, I believe
the new behaviour is the desired behaviour.
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the type== branch 3 times, most recently from eacd058 to 8abf3d9 Compare May 16, 2025 10:03
Copy link
Member

@jorenham jorenham left a comment

Choose a reason for hiding this comment

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

These seems safe enough. And in case a np.bytes_ is now passed as bytes, I believe it would (still?) work.

@jorenham jorenham merged commit 5fe514b into numpy:main May 16, 2025
74 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the type== branch May 16, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.