moscot.problems.generic.GWProblem.pull¶
- GWProblem.pull(source, target, data=None, subset=None, scale_by_marginals=True, key_added='pull', return_all=False, **kwargs)¶
Pull mass from target to source.
- 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 pull, seepull()
for information.subset (
Union
[str
,List
[str
],Tuple
[int
,int
],None
]) – Pull values contained only within the subset.scale_by_marginals (
bool
) – Whether to scale by the source marginals.key_added (
Optional
[str
]) – Key inobs
where to add the result.return_all (
bool
) – Whether to also return intermediate results. Always true ifkey_added != None
.kwargs (
Any
) – Keyword arguments for the subproblems’pull()
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
:None
- returns the result.str
- returns nothing and updatesobs['{key_added}']
with the result.