From bdaa745760ba36e6b645d488097b6c1a6a977aa2 Mon Sep 17 00:00:00 2001 From: HU Xuesong <87519979+huxs001@users.noreply.github.com> Date: Thu, 23 Oct 2025 13:20:13 +0800 Subject: [PATCH] Fix #424 AttributeError: 'Series' object has no attribute 'nonzero' modified: docs/notebooks/tutorial_utils.py --- docs/notebooks/tutorial_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/notebooks/tutorial_utils.py b/docs/notebooks/tutorial_utils.py index ec79f3ed..f9ec727f 100644 --- a/docs/notebooks/tutorial_utils.py +++ b/docs/notebooks/tutorial_utils.py @@ -16,7 +16,7 @@ def plot_genes_per_cell_type(slide, genes, ctypes): # limit color scale at 99.2% quantile of gene expression (computed across cell types) quantile_across_ct = np.array( [ - np.quantile(slide.layers[n][:, slide.var["SYMBOL"] == genes[j]].toarray(), 0.992) + np.quantile(slide.layers[n][:, (slide.var["SYMBOL"] == genes[j]).values].toarray(), 0.992) for n in slide.uns["mod"]["factor_names"] ] )