MCPcopy Index your code
hub / github.com/pydata/xarray / collect_from_coordinates

Function collect_from_coordinates

xarray/structure/merge.py:421–433  ·  view source on GitHub ↗

Collect variables and indexes to be merged from Coordinate objects.

(
    list_of_coords: list[Coordinates],
)

Source from the content-addressed store, hash-verified

419
420
421def collect_from_coordinates(
422 list_of_coords: list[Coordinates],
423) -> dict[Hashable, list[MergeElement]]:
424 """Collect variables and indexes to be merged from Coordinate objects."""
425 grouped: dict[Hashable, list[MergeElement]] = defaultdict(list)
426
427 for coords in list_of_coords:
428 variables = coords.variables
429 indexes = coords.xindexes
430 for name, variable in variables.items():
431 grouped[name].append((variable, indexes.get(name)))
432
433 return grouped
434
435
436def merge_coordinates_without_align(

Callers 1

Calls 2

itemsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…