Skip to content

Commit eb98c3a

Browse files
committed
Merge branch 'main' of github.com:scverse/mudata
2 parents 625cfc6 + e11201e commit eb98c3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mudata/_core/mudata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def _init_as_view(self, mudata_ref: "MuData", index):
335335
size = getattr(self, attr).shape[0]
336336
for mod, mapping in getattr(mudata_ref, attr + "map").items():
337337
cposmap = np.zeros((size,), dtype=mapping.dtype)
338-
cidx = mapping[idx] > 0
338+
cidx = (mapping[idx] > 0).ravel()
339339
cposmap[cidx > 0] = np.arange(cidx.sum()) + 1
340340
posmap[mod] = cposmap
341341
setattr(self, "_" + attr + "map", posmap)
@@ -1989,7 +1989,7 @@ def _pull_attr(
19891989
for m, mod in self.mod.items():
19901990
if mods is not None and m not in mods:
19911991
continue
1992-
mod_map = attrmap[m]
1992+
mod_map = attrmap[m].ravel()
19931993
mod_n_attr = mod.n_vars if attr == "var" else mod.n_obs
19941994
mask = mod_map != 0
19951995

0 commit comments

Comments
 (0)