Skip to content

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
@Illviljan Illviljan requested a review from andersy005 October 30, 2023 20:23
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
@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