Skip to content

Commit 0780a5a

Browse files
authored
isel when channel is int (#285)
1 parent 80dfe4b commit 0780a5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spatialdata_plot/pl/render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def _render_images(
400400

401401
# 1) Image has only 1 channel
402402
if n_channels == 1 and not isinstance(render_params.cmap_params, list):
403-
layer = img.sel(c=channels[0]).squeeze()
403+
layer = img.sel(c=channels[0]).squeeze() if isinstance(channels[0], str) else img.isel(c=channels[0]).squeeze()
404404

405405
if render_params.percentiles_for_norm != (None, None):
406406
layer = _normalize(

0 commit comments

Comments
 (0)