Benoit Bovy
Benoit Bovy
Thanks @gahjelle that is a good idea! > We tried a few different approaches to avoid too much boilerplate/copy-paste code, including ways of creating dynamic types but didn't find anything...
> The types would probably be slightly less specific as, for example, radius would be an allowed optional parameter on all (Nin2) types. Maybe we could define optional parameter types...
I gave a try at implementing a solution based on `TypedDict` + `Unpack` (see #65) but didn't really succeed unfortunately. It looks like both Python typing and static type checkers...
Thank you @gahjelle !
I agree that explicitly setting the index can be a bit annoying sometimes. I'm a little worried about automatically creating (even temporary) indexes, though. The created index would be a...
We've discussed about this with @dcherian @keewis and @ianhi. I changed my mind, this is actually a good idea :). > I would not modify the xarray object in place....
Thanks for the report @geojobueno. This is because [Xarray-simlab](https://github.com/xarray-contrib/xarray-simlab) used here doesn't support Zarr 3.x yet. I works with your python 3.10 conda environment likely because Zarr 2.x is installed...
Indeed `NDPointIndex` supports only the case where the n-dimensions of the point coordinates match the n-dimensions of the space in which they are distributed, i.e., the number of index coordinates...
@dalonsoa the examples in your last comment are working now with #8094, i.e., ```python ds = xr.Dataset({"one": da1}) ds["four"] = xr.zeros_like(ds.one) ``` and ```python ds = xr.Dataset({"one": da1, "two": xr.zeros_like(da1)})...
Yes I think a basic array index would help for such case. Even better here would be an Astropy-specific custom index (see https://github.com/pydata/xarray/pull/9543#issuecomment-2385562215 and https://xarray-indexes.readthedocs.io/blocks/transform.html)!