NEP: New NEP for identifying and coercing duck arrays#10706
Closed
njsmith wants to merge 2 commits intonumpy:masterfrom
Closed
NEP: New NEP for identifying and coercing duck arrays#10706njsmith wants to merge 2 commits intonumpy:masterfrom
njsmith wants to merge 2 commits intonumpy:masterfrom
Conversation
eric-wieser
reviewed
Mar 18, 2018
| ahead and add some basic attributes like ``ndim``, ``shape``, | ||
| ``dtype``. | ||
|
|
||
| Adding new abstract methods will be a bit trick, because ABCs enforce |
eric-wieser
reviewed
Mar 18, 2018
| start using it by habit without endless exhortations. | ||
|
|
||
| One option would be to actually change ``asarray``\'s semantics so | ||
| that *it* passes through ``AbstractArray`` objects unchanged. But I'm |
Member
There was a problem hiding this comment.
Perhaps just change asanyarray?
eric-wieser
reviewed
Mar 18, 2018
| We can't use ``asanyarray`` or ``array``, since those are already | ||
| taken. | ||
|
|
||
| Any other ideas? ``np.cast``, ``np.coerce``? |
Member
There was a problem hiding this comment.
np.cast[np.float16](x) is already a thing
eric-wieser
reviewed
Mar 18, 2018
| -------------- | ||
|
|
||
| 1. Rename ``NDArrayOperatorsMixin`` to ``AbstractArray`` (leaving | ||
| behind an alias for backwards compatibility) and make it an ABC. |
Member
There was a problem hiding this comment.
Why not keep them separate, and have AbstractArray subclass the mixin? What about users who just want to use ufuncs, but no other part of the array interface?
Member
|
Needs rebase to get rid of circleci error. |
Member
|
@njsmith should we move forward with merging this? It needs a rebase and some small fixes |
This was referenced Oct 14, 2018
Member
|
Maybe we can merge this in #12174 instead? |
Member
|
Closing in favor of #12174 |
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.
No description provided.