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

Add duckarray test for np.array_api #8391

Merged
merged 6 commits into from
Oct 31, 2023

Conversation

Illviljan
Copy link
Contributor

@Illviljan Illviljan commented Oct 29, 2023

Check if the Array object from numpy.array_api is a valid duckarray.
If it isn't we're likely doing something wrong.

Comments:

  • array_api standard does not specify a __array__-method.
    • Move __array__ to _arrayfunction only
    • We therefore have to use np.asarray(namedarray.data) when comparing ndarrays in the tests

Seen in #8344

@Illviljan Illviljan changed the title Add array_api test Add duckarray test for np.array_api Oct 29, 2023
@github-actions github-actions bot added the topic-NamedArray Lightweight version of Variable label Oct 29, 2023
@Illviljan Illviljan marked this pull request as ready for review October 29, 2023 13:21
Copy link
Member

@andersy005 andersy005 left a comment

Choose a reason for hiding this comment

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

Looks solid to me 👍🏽

@andersy005 andersy005 added the plan to merge Final call for comments label Oct 30, 2023
@andersy005 andersy005 merged commit cfe4d71 into pydata:main Oct 31, 2023
32 checks passed
@Illviljan Illviljan deleted the add_array_api_tests branch December 6, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments topic-NamedArray Lightweight version of Variable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants