Skip to content

Commit 5bf8d54

Browse files
committed
fix obs_vector / var_vector return type
1 parent 9783f74 commit 5bf8d54

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 7 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

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)