Benoit Bovy
Benoit Bovy
Thanks for pinging me @rabernat. > Maybe xoak will just provide the index objects themselves, which xarray can then use? Yes that's the plan with Xoak. I think it will...
> I also still don't quite understand how other methods work since the refactor, so this only implements sel. Here are a few comments. Happy to answer questions if any....
tl;dr: Xarray `Index` currently supports implementing periodic indexing for label-based indexing but not for location-based (integer) indexing. There's a big difference now between `isel` and `sel`: - `Dataset.isel()` accepts dimension...
> My understanding from reading the docs was that every `Dataset.meth` calls the corresponding `Index.meth`. Yes that's indeed what I've written in #6975 and I realize now that this is...
Great @TomNicholas! To avoid copying the body of `PandasIndex.sel`, couldn't you "just" do something like this? ```python class PeriodicBoundaryIndex(PandasIndex): """ An index representing any 1D periodic numberline. Implementation subclasses a...
> In general, it seems like most (nearly all?) 1D indexing use cases can be handled by encapsulating a PandasIndex (see also https://github.com/dcherian/crsindex). So perhaps we should just recommend that...
Perhaps Xarray has been too clever so far regarding how it handles pandas objects passed directly as coordinate data? `pandas.MultiIndex` objects are handled in a specific way too, which is...
> So maybe the question here is whether such an ArrayIndex should be the default? Another solution for more flexibility or a smooth transition may be to add a build...
> The behaviour is likely caused by the fact that the indexes generated for the coordinates are no longer strictly equal, therefore where() picks only the two outer cells of...
I also like the idea of alignment with some tolerance. There is an open PR #4489, which needs to be reworked in the context of the explicit index refactor. Alternatively...