BUG: Add __array_api_version__ to numpy.array_api namespace#22365
Merged
charris merged 1 commit intonumpy:mainfrom Oct 2, 2022
Merged
BUG: Add __array_api_version__ to numpy.array_api namespace#22365charris merged 1 commit intonumpy:mainfrom
__array_api_version__ to numpy.array_api namespace#22365charris merged 1 commit intonumpy:mainfrom
Conversation
__array_api_version__ to numpy.array_api namespace__array_api_version__ to numpy.array_api namespace
Member
|
Thanks @honno . Out of curiousity, does |
__array_api_version__ to numpy.array_api namespace__array_api_version__ to numpy.array_api namespace
Contributor
Author
Nope, infact there's no mention of |
tylerjereddy
added a commit
to tylerjereddy/pykokkos
that referenced
this pull request
Oct 4, 2022
* this is in part a copy of the NumPy patch applied at: numpy/numpy#22365 and is related to this failure we were seeing with `hypothesis`: kokkos#65 (comment) * the standard section related to this is: https://data-apis.org/array-api/latest/future_API_evolution.html#versioning * unpin `hypothesis` in our CI as a result; to be fair, this is the solution @ShahzadUmair wanted from the start I think * the updated testing behavior required me to cherry-pick some data type info improvements from kokkosgh-97
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 usinghypothesis.extra.array_api.make_strategies_namespace(), like we do innumpy/numpy/array_api/tests/test_set_functions.py
Line 7 in 7191d9a
This PR should mean this PR works on Hypothesis versions both before and after
6.55.0.