Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: zero-size array to reduction operation minimum which has no identity #25

Open
shanhuhai-i opened this issue Nov 23, 2024 · 0 comments

Comments

@shanhuhai-i
Copy link

hi,

When I run this piece of code, I got an error message, I have no idea. Could you help me?

Thank you~

File "~/lib/python3.10/site-packages/numpy/core/_methods.py", line 44, in _amin return umr_minimum(a, axis, None, out, keepdims, initial, where) ValueError: zero-size array to reduction operation minimum which has no identity

`
path =" /bio/square_002um/"
source_image_path = "/bio/Visium_HD_Mouse_Small_Intestine_tissue_image.btf"

adata = b2c.read_visium(path, source_image_path = source_image_path)
adata.var_names_make_unique()

sc.pp.filter_genes(adata, min_cells=3)
sc.pp.filter_cells(adata, min_counts=1)

mpp = 0.5
b2c.destripe(adata)

thr = 10
mask = ((adata.obs['array_row'] >= 1450) &
(adata.obs['array_row'] <= 1550) &
(adata.obs['array_col'] >= 250) &
(adata.obs['array_col'] <= 450)
)

bdata = adata[mask]
b2c.scaled_he_image(adata, mpp=mpp, save_path="stardist/he.tiff")`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant