Skip to content

Commit 531bd21

Browse files
authored
Use the correct image for alternate spatial bases
Retrieve the image from adata.uns[spatial_key] rather than always adata.uns["spatial"].
1 parent 6621650 commit 531bd21

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/squidpy/pl/_spatial_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _get_image(
171171
raise KeyError(
172172
f"Image key: `{img_res_key}` does not exist. Available image keys: `{image_mapping.values()}`"
173173
)
174-
img = [adata.uns[Key.uns.spatial][i][Key.uns.image_key][img_res_key] for i in library_id]
174+
img = [adata.uns[spatial_key][i][Key.uns.image_key][img_res_key] for i in library_id]
175175

176176
if img_channel is None:
177177
img = [im[..., :3] for im in img]

0 commit comments

Comments
 (0)