(self, applied, dim, positions=None)
| 1584 | yield var[{self._group_dim: indices}] |
| 1585 | |
| 1586 | def _concat_shortcut(self, applied, dim, positions=None): |
| 1587 | # nb. don't worry too much about maintaining this method -- it does |
| 1588 | # speed things up, but it's not very interpretable and there are much |
| 1589 | # faster alternatives (e.g., doing the grouped aggregation in a |
| 1590 | # compiled language) |
| 1591 | # TODO: benbovy - explicit indexes: this fast implementation doesn't |
| 1592 | # create an explicit index for the stacked dim coordinate |
| 1593 | stacked = Variable.concat(applied, dim, shortcut=True) |
| 1594 | reordered = _maybe_reorder(stacked, dim, positions, N=self.group1d.size) |
| 1595 | return self._obj._replace_maybe_drop_dims(reordered) |
| 1596 | |
| 1597 | def _restore_dim_order(self, stacked: DataArray) -> DataArray: |
| 1598 | def lookup_order(dimension): |
no test coverage detected