File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2222 assert_no_index_corrupted ,
2323 create_default_index_implicit ,
2424)
25- from xarray .core .merge import merge_coordinates_without_align , merge_coords
25+ from xarray .core .merge import (
26+ assert_valid_explicit_coords ,
27+ merge_coordinates_without_align ,
28+ merge_coords ,
29+ )
2630from xarray .core .types import DataVars , Self , T_DataArray , T_Xarray
2731from xarray .core .utils import (
2832 Frozen ,
@@ -306,6 +310,14 @@ def __init__(
306310 else :
307311 variables [name ] = var
308312
313+ dims = set (d for var in variables .values () for d in var .dims )
314+ sizes = {
315+ d : - 1 for d in dims
316+ } # TODO the lengths here are never used, so assert_valid_explicit_coords should be refactored
317+ assert_valid_explicit_coords (
318+ variables , dims = sizes , explicit_coords = list (variables )
319+ )
320+
309321 if indexes is None :
310322 indexes = {}
311323 else :
You can’t perform that action at this time.
0 commit comments