DEP: Expire deprecation of dtype/signature allowing instances#22540
Merged
charris merged 4 commits intonumpy:mainfrom Nov 9, 2022
Merged
DEP: Expire deprecation of dtype/signature allowing instances#22540charris merged 4 commits intonumpy:mainfrom
charris merged 4 commits intonumpy:mainfrom
Conversation
We never really allowed instances here and deprecated it since NumPy 1.21 (it just failed completely in 1.21.0).
charris
reviewed
Nov 7, 2022
| @@ -0,0 +1,3 @@ | |||
| * Passing dtype instances other than the default ones to | |||
| ``dtype=`` or ``signature=` in ufuncs will now raise a | |||
Member
There was a problem hiding this comment.
"default" could use some clarification. I assume some of the outdate alternate (example?) types are deprecated?
Member
Author
There was a problem hiding this comment.
Hmmm, tried to make it more specific. Basically, I still allow the singleton instances (and things that are equivalent to it). But really, we only enforce the DType (class/type) anyway, and are just generous about allowing those.
Contributor
There was a problem hiding this comment.
FWIW the new wording LGTM and matches the terminology (i.e. "canonical") in the relevant NEPs
We still allow the "singleton" instances (which mainly applies to our own dtypes), mainly because it wouldn't really do much good to disallow them, even if they are not specific (since we don't enforce the byte-order, but we never return non-native byte order for example).
ef38bff to
ec23c51
Compare
rossbar
approved these changes
Nov 7, 2022
| @@ -0,0 +1,3 @@ | |||
| * Passing dtype instances other than the default ones to | |||
| ``dtype=`` or ``signature=` in ufuncs will now raise a | |||
Contributor
There was a problem hiding this comment.
FWIW the new wording LGTM and matches the terminology (i.e. "canonical") in the relevant NEPs
Co-authored-by: Ross Barnowski <[email protected]>
Member
|
Thanks Sebastian, |
6 tasks
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.
We never really allowed instances here and deprecated it since NumPy 1.21 (it just failed completely in 1.21.0).