@@ -355,12 +355,12 @@ def append_all(variables, indexes):
355
355
356
356
for name , variable in mapping .items ():
357
357
if isinstance (variable , DataArray ):
358
- coords = variable ._coords .copy () # use private API for speed
359
- indexes = dict (variable ._indexes )
358
+ coords_ = variable ._coords .copy () # use private API for speed
359
+ indexes_ = dict (variable ._indexes )
360
360
# explicitly overwritten variables should take precedence
361
- coords .pop (name , None )
362
- indexes .pop (name , None )
363
- append_all (coords , indexes )
361
+ coords_ .pop (name , None )
362
+ indexes_ .pop (name , None )
363
+ append_all (coords_ , indexes_ )
364
364
365
365
variable = as_variable (variable , name = name )
366
366
if name in indexes :
@@ -561,7 +561,7 @@ def merge_coords(
561
561
aligned = deep_align (
562
562
coerced , join = join , copy = False , indexes = indexes , fill_value = fill_value
563
563
)
564
- collected = collect_variables_and_indexes (aligned )
564
+ collected = collect_variables_and_indexes (aligned , indexes = indexes )
565
565
prioritized = _get_priority_vars_and_indexes (aligned , priority_arg , compat = compat )
566
566
variables , out_indexes = merge_collected (collected , prioritized , compat = compat )
567
567
return variables , out_indexes
0 commit comments