Conversation
|
Aha, here's a concrete feature request This index is shared between dims So I cannot do because I get So I cannot do Then the alignment does not exclude Q: If asked to concat along a dim with a multi-dim index, then should we exclude all of those dims? Using combine_nested seems promising, perhaps that is the solution |
|
Nope,
I don't see any other option at the moment. especially if we want |
It might be worth trying, although I don't know much what implications this rule would have in the general case. Or maybe trying to fit this case into From a UX perspective, however, the alignment error above while technically correct does not give a chance of providing more context. We should probably give this chance, e.g., via some dedicated Xarray Index API (the alignment error is raised from a loop iterating over index objects). |
|
OK this should be good to go! |
| self._shape = { | ||
| "x": self._wrapped_indexes["x"].axis_transform.size, | ||
| "y": self._wrapped_indexes["y"].axis_transform.size, | ||
| } |
There was a problem hiding this comment.
We should avoid hard-coding "x" and "y" coordinate names.
We should also fix self._shape for the following cases:
- There's only one wrapped index, either
AxisAffineTransformIndexorPandasIndex(e.g., result from indexing with a scalar on one of the raster dimensions) - There's two wrapped
PandasIndexinstances (e.g., result from indexing with arbitrary array values)
There was a problem hiding this comment.
I think I got this on the PR branch with docs 😓
There was a problem hiding this comment.
I'm refactoring RasterIndex in #43. I think it will make our lives much easier... Supporting the cases above in RasterIndex was a (my) bad idea.
Closes #20
TODO:
Details
@benbovy feel free to take over if you have time.
This is ugly BUT for the example in https://github.com/dcherian/rasterix/issues/16#issuecomment-2811585219
now gets as far as