Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

✨ HasDType, Array #48

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
nstarman merged 3 commits into data-apis:main from nstarman:has-dtype
Jul 23, 2025
Merged

✨ HasDType, Array #48

nstarman merged 3 commits into data-apis:main from nstarman:has-dtype
Jul 23, 2025

Conversation

@nstarman
Copy link
Collaborator

@nstarman nstarman commented Jul 22, 2025
edited
Loading

(削除) Relies on #47 (削除ここまで)

A new PR to precede #32.

@nstarman nstarman added this to the v2021-12-0.0 milestone Jul 22, 2025
@nstarman nstarman force-pushed the has-dtype branch 2 times, most recently from 9b98cc1 to b8cc51d Compare July 22, 2025 14:43
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.

sorry if this is premature, but maybe these comments can help 🤷🏻

nstarman reacted with thumbs up emoji
@@ -1,11 +1,52 @@
fromtypingimportAny
# mypy: disable-error-code="no-redef"
Copy link
Member

Choose a reason for hiding this comment

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

is this needed for the redefinition of _?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't want to name all the variables.

Copy link
Member

Choose a reason for hiding this comment

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

There are only two hard things in Computer Science: cache invalidation and naming things.

-- Phil Karlton

nstarman reacted with laugh emoji
Copy link
Member

Choose a reason for hiding this comment

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

Or even better:

There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.

-- Leon Bambrick

@nstarman nstarman force-pushed the has-dtype branch 3 times, most recently from f203d12 to 5ad0d5c Compare July 22, 2025 15:14
@nstarman nstarman added 🎨 structure/format Improve structure / format of the code. ✨ feature Introduce new features. 👷 CI Add or update CI build system. labels Jul 22, 2025
@nstarman nstarman force-pushed the has-dtype branch 4 times, most recently from 3434139 to 0e79721 Compare July 22, 2025 15:22
Copy link
Collaborator Author

numpy 2.0's array_api stuff is infinitely better than 1.0's. It's a real struggle to write tests that both pass and test what we want. 😮‍💨

@nstarman nstarman marked this pull request as ready for review July 22, 2025 15:23
Copy link
Collaborator Author

nstarman commented Jul 22, 2025
edited
Loading

@jorenham. Ok. this PR was much easier than #32 and hopefully will help with that one, particularly in writing more comprehensive tests. Might go one Can* binop at a time given some of the complexity with bool-dtyped arrays.
But we should probably have more array libraries being tested... and other type checkers doing the testing...

Copy link
Collaborator Author

Pushed to add docs to HasArrayNamespace

Signed-off-by: nstarman <nstarman@users.noreply.github.com>
@nstarman nstarman changed the title (削除) ✨ HasDType (削除ここまで) (追記) ✨ HasDType, Array (追記ここまで) Jul 22, 2025
nstarman added 2 commits July 22, 2025 11:45
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Copy link
Collaborator Author

Forgot to have Array inherit from HasArrayNamespace. That's kind of the most important one 😆

jorenham reacted with laugh emoji

Copy link
Collaborator Author

nstarman commented Jul 22, 2025
edited
Loading

Ok. @jorenham now it should really be ready for a review.

jorenham reacted with eyes emoji

Copy link
Member

numpy 2.0's array_api stuff is infinitely better than 1.0's. It's a real struggle to write tests that both pass and test what we want. 😮‍💨

Maybe we could use array-api-compat for numpy<2.0?

Copy link
Collaborator Author

That's a good idea. After this PR because things are passing?

jorenham reacted with thumbs up emoji

Copy link
Member

But we should probably have more array libraries being tested... and other type checkers doing the testing...

Yea, I'll get on that soon (after I fix optype and scipy-stubs apparently being broken on numpy<2.3 😅).

nstarman reacted with hooray emoji nstarman reacted with eyes emoji

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.

should be good to merge

nstarman reacted with hooray emoji
@nstarman nstarman merged commit bacf0f9 into data-apis:main Jul 23, 2025
16 checks passed
@nstarman nstarman deleted the has-dtype branch July 23, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jorenham jorenham jorenham approved these changes

Assignees

No one assigned

Labels

👷 CI Add or update CI build system. ✨ feature Introduce new features. 🎨 structure/format Improve structure / format of the code.

Projects

None yet

Milestone

v2021-12-0.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /