Skip to content

Commit

Permalink
(fix): do proper in-place update
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-gold committed Oct 15, 2024
1 parent 79a20a8 commit 0afc23a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion muon/_core/preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ def func(x):
for m in data.mod.keys():
obsmap = data.obsmap[m][obs_subset]
obsidx = obsmap > 0
data.mod[m] = data.mod[m][data.mod[m].obs_names[obsmap[obsidx] - 1]]
data.mod[m]._obs = data.mod[m].obs.loc[data.mod[m].obs_names[obsmap[obsidx] - 1]]
maporder = np.argsort(obsmap[obsidx])
nobsmap = np.empty(maporder.size)
nobsmap[maporder] = np.arange(1, maporder.size + 1)
Expand Down

0 comments on commit 0afc23a

Please sign in to comment.