Resolve the inherit parameter to (coord_vars, indexes).
(
self, inherit: bool | Literal["all_coords", "indexes"]
)
| 596 | ) |
| 597 | |
| 598 | def _resolve_inherit( |
| 599 | self, inherit: bool | Literal["all_coords", "indexes"] |
| 600 | ) -> tuple[Mapping[Hashable, Variable], dict[Hashable, Index]]: |
| 601 | """Resolve the inherit parameter to (coord_vars, indexes).""" |
| 602 | if inherit is False: |
| 603 | return self._node_coord_variables, dict(self._node_indexes) |
| 604 | if inherit is True or inherit == "indexes": |
| 605 | return self._coord_variables, dict(self._indexes) |
| 606 | if inherit == "all_coords": |
| 607 | return self._coord_variables_all, dict(self._indexes) |
| 608 | raise ValueError( |
| 609 | f"Invalid value for inherit: {inherit!r}. " |
| 610 | "Expected True, False, 'indexes', or 'all'." |
| 611 | ) |
| 612 | |
| 613 | @property |
| 614 | def _dims(self) -> ChainMap[Hashable, int]: |
no outgoing calls
no test coverage detected