A test is failing due to the most recent xarray v2023.08.0 update. Apparently the indexes attribute is not updated anymore when setting values on coordinates as follows:
up = xr.DataArray(
data=np.arange(4),
coords={"x": [2.0, 4.0, 6.0, 8.0]},
dims=["x"],
name="grid",
)
up["x"].values[2] = 3.0
print(up["x"].indexes)
# up["x"].indexes not updated
But this works:
up = up.assign_coords(x = [2.0, 4.0, 3.0, 8.0])
print(up["x"].indexes)
# up["x"].indexes are updated
A test is failing due to the most recent xarray v2023.08.0 update. Apparently the indexes attribute is not updated anymore when setting values on coordinates as follows:
But this works:
It turns out the first example is not what the xarray devs have in mind on how coords should be set, so this explains why this test is failing without this fix.