diff --git a/src/cellrank/estimators/terminal_states/_gpcca.py b/src/cellrank/estimators/terminal_states/_gpcca.py index edf78cfd..cc55dd26 100644 --- a/src/cellrank/estimators/terminal_states/_gpcca.py +++ b/src/cellrank/estimators/terminal_states/_gpcca.py @@ -1051,7 +1051,7 @@ def plot_macrostate_composition( mask = ~macrostates.isnull() df = ( pd.DataFrame({"macrostates": macrostates, key: self.adata.obs[key]})[mask] - .groupby([key, "macrostates"], observed=True) + .groupby([key, "macrostates"], observed=False) .size() ) try: diff --git a/src/cellrank/kernels/utils/_tmat_flow.py b/src/cellrank/kernels/utils/_tmat_flow.py index c2fbd75d..d12c9fd1 100644 --- a/src/cellrank/kernels/utils/_tmat_flow.py +++ b/src/cellrank/kernels/utils/_tmat_flow.py @@ -180,7 +180,7 @@ def cluster_helper(t1: Numeric_t, t2: Numeric_t) -> pd.DataFrame: subset, row_cls, col_cls = self._get_time_subset(t1, t2, cluster=cluster) df = pd.DataFrame(subset.toarray() if sp.issparse(subset) else subset).sum(0) - df = df.groupby(col_cls, observed=True).sum() + df = df.groupby(col_cls, observed=False).sum() df = pd.DataFrame([df], index=[cluster], columns=df.index) res = pd.DataFrame(np.zeros((1, n)), index=[cluster], columns=categories)