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

Function get_chunksizes

xarray/core/common.py:2052–2065  ·  view source on GitHub ↗
(
    variables: Iterable[Variable],
)

Source from the content-addressed store, hash-verified

2050
2051
2052def get_chunksizes(
2053 variables: Iterable[Variable],
2054) -> Mapping[Any, tuple[int, ...]]:
2055 chunks: dict[Any, tuple[int, ...]] = {}
2056 for v in variables:
2057 if hasattr(v._data, "chunks"):
2058 for dim, c in v.chunksizes.items():
2059 if dim in chunks and c != chunks[dim]:
2060 raise ValueError(
2061 f"Object has inconsistent chunks along dimension {dim}. "
2062 "This can be fixed by calling unify_chunks()."
2063 )
2064 chunks[dim] = c
2065 return Frozen(chunks)
2066
2067
2068def is_np_datetime_like(dtype: DTypeLike | None) -> bool:

Callers 4

chunksMethod · 0.90
chunksizesMethod · 0.90
chunksizesMethod · 0.90
chunksizesMethod · 0.90

Calls 2

FrozenClass · 0.90
itemsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…