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

return empty array if boolean index array is all False #1198

Merged
merged 3 commits into from Oct 16, 2022

Conversation

jswhit
Copy link
Collaborator

@jswhit jswhit commented Oct 11, 2022

alternative to PR #1197

@jswhit
Copy link
Collaborator Author

jswhit commented Oct 11, 2022

Behavior is consistent with numpy. Also, indexing 1d variables with boolean index arrays that are all False already return empty arrays (but for variables with more than one dimension an exception is raised). With this PR the behavior for multi-dim variables is consistent with the current behavior for 1d variables (and slicing numpy arrays)

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

Successfully merging this pull request may close these issues.

None yet

1 participant