Skip to content

Commit ca96475

Browse files
committed
fix obs_vector / var_vector return type
(cherry picked from commit 8f195de)
1 parent 43276d0 commit ca96475

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ and this project adheres to [Semantic Versioning][].
1717
- The settings API has changed. Use e.g. `mudata.settings.pull_on_update = True` instead of `mudata.set_options(pull_on_update=True)` and use
1818
`mudata.settings.override` as context manager for local settings overrides.
1919

20+
## [0.3.8] (Unreleased)
21+
22+
### Fixed
23+
24+
- `obs_vector` and `var_vector` once again return Pandas Series objects when appropriate. This fixes
25+
applying `sc.pl.umap` on a MuData object.
26+
2027
## [0.3.7]
2128

2229
### Fixed
@@ -172,6 +179,7 @@ To copy the annotations explicitly, you will need to use `pull_obs()` and/or `pu
172179
Initial `mudata` release with `MuData`, previously a part of the `muon` framework.
173180

174181
[0.4.0]: https://github.com/scverse/mudata/releases/tag/v0.4.0
182+
[0.3.8]: https://github.com/scverse/mudata/releases/tag/v0.3.8
175183
[0.3.7]: https://github.com/scverse/mudata/releases/tag/v0.3.7
176184
[0.3.6]: https://github.com/scverse/mudata/releases/tag/v0.3.6
177185
[0.3.5]: https://github.com/scverse/mudata/releases/tag/v0.3.5

src/mudata/_core/mudata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ def _attr_vector(self, key: str, attr: str) -> np.ndarray:
820820
f"There is no key {key} in MuData .{attr} but there is one in {m} .{attr}. Consider running `update_{attr}()` to update global .{attr}."
821821
)
822822
raise KeyError(f"There is no key {key} in MuData .{attr} or in .{attr} of any modalities.")
823-
return df[key].to_numpy()
823+
return df[key].values
824824

825825
@deprecated(Deprecation("0.3.4"))
826826
def obs_vector(self, key: str, layer: str | None = None) -> np.ndarray:

0 commit comments

Comments
 (0)