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

NEP: New NEP for identifying and coercing duck arrays #10706

Closed
wants to merge 2 commits into from

Conversation

@njsmith
Copy link
Member

njsmith commented Mar 8, 2018

No description provided.

ahead and add some basic attributes like ``ndim``, ``shape``,
``dtype``.

Adding new abstract methods will be a bit trick, because ABCs enforce

This comment has been minimized.

Copy link
@eric-wieser

eric-wieser Mar 18, 2018

Member

typo: tricky

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

This comment has been minimized.

Copy link
@eric-wieser

eric-wieser Mar 18, 2018

Member

Perhaps just change asanyarray?

We can't use ``asanyarray`` or ``array``, since those are already
taken.

Any other ideas? ``np.cast``, ``np.coerce``?

This comment has been minimized.

Copy link
@eric-wieser

eric-wieser Mar 18, 2018

Member

np.cast[np.float16](x) is already a thing

--------------

1. Rename ``NDArrayOperatorsMixin`` to ``AbstractArray`` (leaving
behind an alias for backwards compatibility) and make it an ABC.

This comment has been minimized.

Copy link
@eric-wieser

eric-wieser Mar 18, 2018

Member

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?

@charris charris changed the title New NEP for identifying and coercing duck arrays NEP: New NEP for identifying and coercing duck arrays Apr 6, 2018
@charris

This comment has been minimized.

Copy link
Member

charris commented Apr 6, 2018

Needs rebase to get rid of circleci error.

@mattip

This comment has been minimized.

Copy link
Member

mattip commented May 29, 2018

@njsmith should we move forward with merging this? It needs a rebase and some small fixes

@shoyer

This comment has been minimized.

Copy link
Member

shoyer commented Oct 14, 2018

Maybe we can merge this in #12174 instead?

@mattip

This comment has been minimized.

Copy link
Member

mattip commented Oct 15, 2018

Closing in favor of #12174

@mattip mattip closed this Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.