Skip to content

Commit 8f195de

Browse files
committed
fix obs_vector / var_vector return type
1 parent 9783f74 commit 8f195de

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
@@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning][].
88
[keep a changelog]: https://keepachangelog.com/en/1.1.0/
99
[semantic versioning]: https://semver.org/spec/v2.0.0.html
1010

11+
## [0.3.8] (Unreleased)
12+
13+
### Fixed
14+
15+
- `obs_vector` and `var_vector` once again return Pandas Series objects when appropriate. This fixes
16+
applying `sc.pl.umap` on a MuData object.
17+
1118
## [0.3.7]
1219

1320
### Fixed
@@ -162,6 +169,7 @@ To copy the annotations explicitly, you will need to use `pull_obs()` and/or `pu
162169

163170
Initial `mudata` release with `MuData`, previously a part of the `muon` framework.
164171

172+
[0.3.8]: https://github.com/scverse/mudata/releases/tag/v0.3.8
165173
[0.3.7]: https://github.com/scverse/mudata/releases/tag/v0.3.7
166174
[0.3.6]: https://github.com/scverse/mudata/releases/tag/v0.3.6
167175
[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
@@ -1247,7 +1247,7 @@ def _attr_vector(self, key: str, attr: str) -> np.ndarray:
12471247
f"There is no key {key} in MuData .{attr} but there is one in {m} .{attr}. Consider running `update_{attr}()` to update global .{attr}."
12481248
)
12491249
raise KeyError(f"There is no key {key} in MuData .{attr} or in .{attr} of any modalities.")
1250-
return df[key].to_numpy()
1250+
return df[key].values
12511251

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

0 commit comments

Comments
 (0)