MCPcopy Index your code
hub / github.com/pydata/xarray / _combine

Method _combine

xarray/core/groupby.py:1681–1706  ·  view source on GitHub ↗

Recombine the applied objects like the original.

(self, applied, shortcut=False)

Source from the content-addressed store, hash-verified

1679 return self.map(func, shortcut=shortcut, args=args, **kwargs)
1680
1681 def _combine(self, applied, shortcut=False):
1682 """Recombine the applied objects like the original."""
1683 applied_example, applied = peek_at(applied)
1684 dim, positions = self._infer_concat_args(applied_example)
1685 if shortcut:
1686 combined = self._concat_shortcut(applied, dim, positions)
1687 else:
1688 combined = concat(
1689 applied,
1690 dim,
1691 data_vars="all",
1692 coords="different",
1693 compat="equals",
1694 join="outer",
1695 )
1696 combined = _maybe_reorder(combined, dim, positions, N=self.group1d.size)
1697
1698 if isinstance(combined, type(self._obj)):
1699 # only restore dimension order for arrays
1700 combined = self._restore_dim_order(combined)
1701 # assign coord and index when the applied function does not return that coord
1702 if dim not in applied_example.dims:
1703 combined = combined.assign_coords(self.encoded.coords)
1704 combined = self._maybe_unstack(combined)
1705 combined = self._maybe_reindex(combined)
1706 return combined
1707
1708 def reduce(
1709 self,

Callers 1

mapMethod · 0.95

Calls 10

_concat_shortcutMethod · 0.95
_restore_dim_orderMethod · 0.95
peek_atFunction · 0.90
concatFunction · 0.90
_maybe_reorderFunction · 0.85
typeFunction · 0.85
_infer_concat_argsMethod · 0.80
_maybe_unstackMethod · 0.80
_maybe_reindexMethod · 0.80
assign_coordsMethod · 0.45

Tested by

no test coverage detected