Fix inconsistent LabelledDataGroup.isel and .sel behaviour with scalar indexers
@jeremiastraub discovered a number of inconsistencies and bugs in LabelledDataGroup
in comparison to xarray behaviour.
- With
drop: true
and scalar selectors, selection does not work at all. - Scalar indexers lead to non-scalar dimensions, i.e.
ldg.sel(foo=123).dims
still containsfoo
- Outer coordinates get dropped among
sel
andisel
if only a single item (of the member map) is selected
Jupyter Notebook containing examples for the described behaviour:
As this was discovered as follow-up of #228 (closed), these test cases (in !217 (merged)) should be extended to also use the LabelledDataGroup
. Perhaps this could be done with #232 (closed) (?).
Edited by Utopia Developers