-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
needs triageIssue that has not been reviewed by xarray team memberIssue that has not been reviewed by xarray team member
Description
What is your issue?
I would expect xr.testing.assert_identical to be true if the objects are identical, values, coords, attrs, and indexes. However, it does not test for what coords have an index attached to them. e.g i would expect this to fail, but it does not:
import xarray as xr
ds = xr.Dataset(
{"data": ("time", [0, 1, 2, 3])},
coords={"time": [0.1, 0.2, 0.3, 0.4], "time_metadata": ("time", [10, 15, 20, 25])},
)
ds_extra_index = ds.set_xindex("time_metadata")
xr.testing.assert_identical(ds, ds_extra_index)I would contend that identical includes what has an index. But curious what others think
Metadata
Metadata
Assignees
Labels
needs triageIssue that has not been reviewed by xarray team memberIssue that has not been reviewed by xarray team member