diff --git a/src/squidpy/gr/_ppatterns.py b/src/squidpy/gr/_ppatterns.py index 292c75994..3e8cb7b04 100644 --- a/src/squidpy/gr/_ppatterns.py +++ b/src/squidpy/gr/_ppatterns.py @@ -348,10 +348,6 @@ def co_occurrence( spatial_key: str = Key.obsm.spatial, interval: int | NDArrayA = 50, copy: bool = False, - n_splits: int | None = None, - n_jobs: int | None = None, - backend: str = "loky", - show_progress_bar: bool = True, ) -> tuple[NDArrayA, NDArrayA] | None: """ Compute co-occurrence probability of clusters. @@ -365,10 +361,6 @@ def co_occurrence( Distances interval at which co-occurrence is computed. If :class:`int`, uniformly spaced interval of the given size will be used. %(copy)s - n_splits - Number of splits in which to divide the spatial coordinates in - :attr:`anndata.AnnData.obsm` ``['{spatial_key}']``. - %(parallelize)s Returns ------- @@ -406,9 +398,7 @@ def co_occurrence( # Compute co-occurrence probabilities using the fast numba routine. out = _co_occurrence_helper(spatial_x, spatial_y, interval, labs) - start = logg.info( - f"Calculating co-occurrence probabilities for `{len(interval)}` intervals using `{n_jobs}` core(s) and `{n_splits}` splits" - ) + start = logg.info(f"Calculating co-occurrence probabilities for `{len(interval)}` intervals") if copy: logg.info("Finish", time=start) diff --git a/tests/graph/test_ppatterns.py b/tests/graph/test_ppatterns.py index 226fb2830..01c2e3033 100644 --- a/tests/graph/test_ppatterns.py +++ b/tests/graph/test_ppatterns.py @@ -137,12 +137,10 @@ def test_co_occurrence(adata: AnnData): assert arr.shape[1] == arr.shape[0] == adata.obs["leiden"].unique().shape[0] -# @pytest.mark.parametrize(("ys", "xs"), [(10, 10), (None, None), (10, 20)]) -@pytest.mark.parametrize(("n_jobs", "n_splits"), [(1, 2), (2, 2)]) -def test_co_occurrence_reproducibility(adata: AnnData, n_jobs: int, n_splits: int): +def test_co_occurrence_reproducibility(adata: AnnData): """Check co_occurrence reproducibility results.""" - arr_1, interval_1 = co_occurrence(adata, cluster_key="leiden", copy=True, n_jobs=n_jobs, n_splits=n_splits) - arr_2, interval_2 = co_occurrence(adata, cluster_key="leiden", copy=True, n_jobs=n_jobs, n_splits=n_splits) + arr_1, interval_1 = co_occurrence(adata, cluster_key="leiden", copy=True) + arr_2, interval_2 = co_occurrence(adata, cluster_key="leiden", copy=True) np.testing.assert_array_equal(sorted(interval_1), sorted(interval_2)) np.testing.assert_allclose(arr_1, arr_2)