Map variable name to numpy(-like) data (Dataset.to_dict() is too complicated).
(x: DataArray | Dataset)
| 140 | |
| 141 | |
| 142 | def make_dict(x: DataArray | Dataset) -> dict[Hashable, Any]: |
| 143 | """Map variable name to numpy(-like) data |
| 144 | (Dataset.to_dict() is too complicated). |
| 145 | """ |
| 146 | if isinstance(x, DataArray): |
| 147 | x = x._to_temp_dataset() |
| 148 | |
| 149 | return {k: v.data for k, v in x.variables.items()} |
| 150 | |
| 151 | |
| 152 | def _get_chunk_slicer(dim: Hashable, chunk_index: Mapping, chunk_bounds: Mapping): |
no test coverage detected
searching dependent graphs…