Skip to content

Commit 717c362

Browse files
committed
fixup! improve push performance scaling
1 parent 0d646ed commit 717c362

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mudata/_core/mudata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,13 +2331,13 @@ def _push_attr(
23312331
# reorder global DF to conform to modality order
23322332
idx = np.empty(mod_n_attr, dtype=mod_map.dtype)
23332333
idx[mod_map[mask] - 1] = np.arange(mod_n_attr)
2334-
df = df.iloc[idx].set_index(np.arange(mod_n_attr))
2334+
df = df.iloc[idx].set_index(np.arange(mod_n_attr, dtype=mod_map.dtype))
23352335

23362336
if not only_drop:
23372337
# TODO: _maybe_coerce_to_bool
23382338
# TODO: _maybe_coerce_to_int
23392339
# TODO: _prune_unused_categories
2340-
mod_df = getattr(mod, attr).set_index(np.arange(mod_n_attr, dtype=mod_map.dtype))
2340+
mod_df = getattr(mod, attr).set_index(np.arange(mod_n_attr))
23412341
mod_df = _update_and_concat(mod_df, df)
23422342
mod_df = mod_df.set_index(getattr(mod, f"{attr}_names"))
23432343
setattr(mod, attr, mod_df)

0 commit comments

Comments
 (0)