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[tuple[int,...],dtype[floating]],Array,None]) – Initial data to push, seepush()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 inobswhere to add the result.return_all (
bool) – Whether to also return intermediate results. Always true ifkey_added != None.**kwargs (
Any) – The description is missing.
- Return type:
Union[ndarray[tuple[int,...],dtype[floating]],Array,Dict[TypeVar(K, bound=Hashable),Union[ndarray[tuple[int,...],dtype[floating]],Array]],None]- Returns:
: Depending on the
key_added:None- returns the result.str- returns nothing and updatesobs['{key_added}']with the result.