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 22
22
assert_no_index_corrupted ,
23
23
create_default_index_implicit ,
24
24
)
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
+ )
26
30
from xarray .core .types import DataVars , Self , T_DataArray , T_Xarray
27
31
from xarray .core .utils import (
28
32
Frozen ,
@@ -306,6 +310,14 @@ def __init__(
306
310
else :
307
311
variables [name ] = var
308
312
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
+
309
321
if indexes is None :
310
322
indexes = {}
311
323
else :
You can’t perform that action at this time.
0 commit comments