Return all dimensions shared by an index. Parameters ---------- key : hashable Index key. errors : {"raise", "ignore"}, default: "raise" If "raise", raises a ValueError if `key` is not in indexes. If "ignore", an empty tuple is ret
(
self, key: Hashable, errors: ErrorOptions = "raise"
)
| 1843 | return {k: self._variables[k] for k in all_coord_names} |
| 1844 | |
| 1845 | def get_all_dims( |
| 1846 | self, key: Hashable, errors: ErrorOptions = "raise" |
| 1847 | ) -> Mapping[Hashable, int]: |
| 1848 | """Return all dimensions shared by an index. |
| 1849 | |
| 1850 | Parameters |
| 1851 | ---------- |
| 1852 | key : hashable |
| 1853 | Index key. |
| 1854 | errors : {"raise", "ignore"}, default: "raise" |
| 1855 | If "raise", raises a ValueError if `key` is not in indexes. |
| 1856 | If "ignore", an empty tuple is returned instead. |
| 1857 | |
| 1858 | Returns |
| 1859 | ------- |
| 1860 | dims : dict |
| 1861 | A dictionary of all dimensions shared by an index. |
| 1862 | |
| 1863 | """ |
| 1864 | from xarray.core.variable import calculate_dimensions |
| 1865 | |
| 1866 | return calculate_dimensions(self.get_all_coords(key, errors=errors)) |
| 1867 | |
| 1868 | def group_by_index( |
| 1869 | self, |