netcdf4-python icon indicating copy to clipboard operation
netcdf4-python copied to clipboard

return empty array if boolean index array is all False

Open jswhit opened this issue 3 years ago • 1 comments

alternative to PR #1197

jswhit avatar Oct 11 '22 02:10 jswhit

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)

jswhit avatar Oct 11 '22 02:10 jswhit