Benoit Bovy
Benoit Bovy
Hi @HCookie, unless I'm missing something it may be possible to implement that fairly easily with concatenation then reduction? E.g., something like: ```python concatenated = xarray.concat([data_1, data_2], "new_dim", join="inner") avg_overlap...
How about this? ```python concatenated = xarray.concat([data_1, data_2], "new_dim", join="outer") avg_overlap = concatenated.mean("new_dim", skipna=True) ```
Hi @ZhaJiMan, this topic has been brought up several times recently (see, e.g., #4825, #6607, #6704). I can't tell much about your latitude / longitude case without a more detailed...
Thanks for the report @momchil-flex. That's definitely a regression. However, I wonder what should we do: depreciate interpreting tuples as sequences and always consider them as "scalar" values or continue...
FWIW, a while ago I wrote a mock-up (and probably outdated) `DatasetNode` class: https://gist.github.com/benbovy/92e7c76220af1aaa4b3a0b65374e233a ([nbviewer link](https://nbviewer.jupyter.org/gist/benbovy/92e7c76220af1aaa4b3a0b65374e233a))
Thanks @emmaai for the issue report and thanks @dcherian and @FabianHofmann for tracking it down. There is a lot of complexity related to `pandas.MultiIndex` special cases and it's been difficult...
Hmm I'd rather expect that in most cases max. 2-3 (meta-)indexes are set, each from possibly a larger number of coordinates (e.g., 2-d staggered grid), but I could be wrong....
Thanks for the report @nunupeke. That's definitely a regression. I'm not that surprised actually as the logic behind `.sel()` is already quite convoluted for the case of (pandas) multi-indexes :-).
> only that the resulting coordinates look a bit weird, containing slices I'm working on this issue right now and I see this too. I don't think that providing slice...
@nunupeke The `TypeError` in your example should be fixed in #7004, which also improves how slice objects are handled in general for a multi-index.