(
variables: Iterable[Variable],
)
| 2050 | |
| 2051 | |
| 2052 | def 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 | |
| 2068 | def is_np_datetime_like(dtype: DTypeLike | None) -> bool: |
no test coverage detected
searching dependent graphs…