-
Notifications
You must be signed in to change notification settings - Fork 52
Add a description of how to adopt the API #33
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
Merged
Conversation
This file contains 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
31 tasks
rgommers
commented
Sep 13, 2020
rgommers
commented
Sep 13, 2020
spec/purpose_and_scope.md
Outdated
implementation to access the API namespace, namely a function: | ||
|
||
``` | ||
mod = x.__array_namespace__(api_version='2020.10') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the last call, everyone seemed happy with this.
Ref discussion from 20 Aug. The thing I left out of this text is a global dispatch. The last point made on that was: ... there is some inherent difficulties. Local dispatch is the more straightforward approach, but difficulties arise when you want a particular function to use a particular backend implementation. and I wasn't quite sure if that concern is valid - maybe I'm missing some details. If the "you" in there is the library author, then they should just ignore the whole API standard namespace and just do `import lib_I_want; lib_I_want.<somefunc>`. If it is the end user, then they normally would pass in an array of the right type that would control this. So the one case I see where the concern applies is if there is some function that does _not_ take any array input, but creates arrays internally _and_ the default array type for that creation is somehow undesirable. That seems a bit unlikely.
7850e2e
to
fd63c5d
Compare
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.
Ref discussion from 20 Aug, and gh-16. The thing I left out of this text is a global dispatch. The last point made on that was:
and I wasn't quite sure if that concern is valid - maybe I'm missing some details. If the "you" in there is the library author, then they should just ignore the whole API standard namespace and just do
If the "you" is the end user, then they normally would pass in an array of the right type that would control this. So the one case I see where the concern applies is if there is some function that does not take any array input, but creates arrays internally and the default array type for that creation is somehow undesirable. That seems a bit unlikely.