netcdf4-python
netcdf4-python copied to clipboard
return empty array if boolean index array is all False
alternative to PR #1197
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)