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

BUG: Add __array_api_version__ to numpy.array_api namespace #22368

Merged
merged 1 commit into from Oct 2, 2022

Conversation

charris
Copy link
Member

@charris charris commented Oct 2, 2022

Backport of #22365.

The Array API has always required namespaces have a __array_api_version__ attribute (see Versioning), although we all missed it heh (hopefully we can make this more visible in the spec data-apis/array-api#480). This PR introduces such an attribute.

This also fixes the issue identified in #22357 (comment) where a Hypothesis update (6.55.0) broke CI, as it required using this (specified!) attribute when using hypothesis.extra.array_api.make_strategies_namespace(), like we do in

xps = make_strategies_namespace(xp)

This PR should mean this PR works on Hypothesis versions both before and after 6.55.0.

@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Oct 2, 2022
@charris charris added this to the 1.23.4 release milestone Oct 2, 2022
@charris charris merged commit dbbf06a into numpy:maintenance/1.23.x Oct 2, 2022
@charris charris deleted the backport-22365 branch October 2, 2022 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants