moscot.problems.generic.FGWProblem.push

FGWProblem.push(source, target, data=None, subset=None, scale_by_marginals=True, key_added='push', return_all=False, **kwargs)

Push mass from source to target.

Parameters:
  • source (TypeVar(K, bound= Hashable)) – Source key in solutions.

  • target (TypeVar(K, bound= Hashable)) – Target key in solutions.

  • data (Union[str, ndarray[Any, dtype[float64]], None]) – Initial data to push, see push() for information.

  • subset (Union[str, List[str], Tuple[int, int], None]) – Push values contained only within the subset.

  • scale_by_marginals (bool) – Whether to scale by the source marginals.

  • key_added (Optional[str]) – Key in obs where to add the result.

  • return_all (bool) – Whether to also return intermediate results. Always true if key_added != None.

  • kwargs (Any) – Keyword arguments for the subproblems’ push() method.

  • self (GenericAnalysisMixinProtocol[K, B])

Return type:

Union[ndarray[Any, dtype[float64]], Dict[TypeVar(K, bound= Hashable), ndarray[Any, dtype[float64]]], None]

Returns:

: Depending on the key_added: