(self)
| 849 | return zip(self.encoded.unique_coord.data, self._iter_grouped(), strict=True) |
| 850 | |
| 851 | def __repr__(self) -> str: |
| 852 | text = ( |
| 853 | f"<{self.__class__.__name__}, " |
| 854 | f"grouped over {len(self.groupers)} grouper(s)," |
| 855 | f" {self._len} groups in total:" |
| 856 | ) |
| 857 | for grouper in self.groupers: |
| 858 | coord = grouper.unique_coord |
| 859 | labels = ", ".join(format_array_flat(coord, 30).split()) |
| 860 | text += ( |
| 861 | f"\n {grouper.name!r}: {type(grouper.grouper).__name__}({grouper.group.name!r}), " |
| 862 | f"{coord.size}/{grouper.full_index.size} groups with labels {labels}" |
| 863 | ) |
| 864 | return text + ">" |
| 865 | |
| 866 | def _iter_grouped(self) -> Iterator[T_Xarray]: |
| 867 | """Iterate over each element in this group""" |
nothing calls this directly
no test coverage detected