Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog

## Version 0.0.11
- BUGFIX: `to_anndata()` only populates `obsm` with spatial coordinates if the original `SpatialExperiment` has spatial coordinates (PR #53)
## Version 0.0.11-0.0.12
- BUGFIX: `to_anndata()` only populates `obsm` with spatial coordinates if the original `SpatialExperiment` has spatial coordinates (PR #53, #54)


## Version 0.0.10
Expand Down
2 changes: 1 addition & 1 deletion src/spatialexperiment/spatialexperiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ def to_anndata(self, include_alternative_experiments: bool = False) -> "anndata.
"tissue_hires_scalef": row["scale_factor"]
} # default to `tissue_hires_scalef` for now

if len(self.spatial_coordinates) > 0:
if self.spatial_coords_names:
coords_by_axis = [self.spatial_coordinates[axis] for axis in self.spatial_coords_names]
obj.obsm["spatial"] = np.column_stack(coords_by_axis)

Expand Down