Skip to content

Commit 08d365e

Browse files
committed
update type annotation in docstrings
1 parent 774ed46 commit 08d365e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

spatialleiden/_multiplex_leiden.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ def spatialleiden(
201201
Parameters
202202
----------
203203
adata : anndata.AnnData
204-
resolution : tuple[float, float], optional
204+
resolution : float | tuple[float, float], optional
205205
Resolution for the latent space and spatial layer, respectively.
206+
A single float applies to both layers.
206207
latent_neighbors : scipy.sparse.sparray | scipy.sparse.spmatrix | numpy.ndarray
207208
Matrix of row-wise neighbor definitions in the latent space layer
208209
i.e. c\\ :sub:`ij` is the connectivity of i :math:`\\to` j.
@@ -211,12 +212,12 @@ def spatialleiden(
211212
i.e. c\\ :sub:`ij` is the connectivity of i :math:`\\to` j.
212213
key_added : str, optional
213214
Key to store the clustering results in :py:attr:`anndata.AnnData.obs`
214-
directed : tuple[bool, bool], optional
215+
directed : bool | tuple[bool, bool], optional
215216
Whether to use a directed graph for latent space and spatial neighbors,
216-
respectively.
217-
use_weights : tuple[bool, bool], optional
217+
respectively. A single bool applies to both layers.
218+
use_weights : bool | tuple[bool, bool], optional
218219
Whether to use weights for the edges for latent space and spatial neighbors,
219-
respectively.
220+
respectively. A single bool applies to both layers.
220221
n_iterations : int, optional
221222
Number of iterations to run the Leiden algorithm. If the number is negative it
222223
runs until convergence.

spatialleiden/_resolution_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ def search_resolution(
151151
adata : anndata.AnnData
152152
n_clusters : int
153153
Number of clusters.
154-
start : float, optional
155-
Starting point for resolution.
154+
start : tuple[float, float], optional
155+
Starting points for resolution, latent and spatial layer, respectively.
156156
step : float, optional
157157
Increment if cluster number is incorrect.
158158
n_iter : int, optional

0 commit comments

Comments
 (0)