17 Jul
2020
17 Jul
'20
3:11 p.m.
On Fri, Jul 17, 2020 at 12:19 PM David Mertz <mertz@gnosis.cx> wrote:
Fwiw, I'm probably -0 on the feature itself. Someone suggested it could be useful for xarray, but I'm not sure now what that would look like. If someone had an example, I could easily be moved.
Here is what it currently looks like to assign values to indices in xarray (adapted from a tutorial): ds["empty"].loc[dict(lon=5, lat=6)] = 10 This could be changed to: ds["empty"][lon=5, lat=6] = 10 This becomes even a bigger advantage if we include slicing, which I think we should: ds["empty"].loc[dict(lon=slice(1, 5), lat=slice(3, None))] = 10 to ds["empty"][lon=1:5, lat=6:] = 10