Skip to content

arr[arr.nonzero()] does not work #295

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

Closed
eric-wieser opened this issue Oct 17, 2019 · 2 comments
Closed

arr[arr.nonzero()] does not work #295

eric-wieser opened this issue Oct 17, 2019 · 2 comments
Labels
enhancement Indicates new feature requests

Comments

@eric-wieser
Copy link
Contributor

In [7]: m
Out[7]: <COO: shape=(32, 32, 32), dtype=float64, nnz=1024, fill_value=0.0>

In [6]: m[m.nonzero()]
IndexError: Only indices with at most one iterable index are supported.
@hameerabbasi
Copy link
Collaborator

Advanced indexing with more than one iterable index is not currently supported. m.nonzero() returns a tuple of three iterable indices... Therefore, the error message is valid. For COO, you can use arr.data instead.

We are waiting on NEP-21 to pass before we implement generalized advanced indexing.

@hameerabbasi hameerabbasi added the enhancement Indicates new feature requests label Oct 17, 2019
@hameerabbasi
Copy link
Collaborator

Duplicate of #114.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

2 participants