Skip to content

Commit

Permalink
Fix iteration over Pandas Series
Browse files Browse the repository at this point in the history
Use `items` instead of `iteritems`.
  • Loading branch information
WeilerP committed Jul 11, 2024
1 parent d3e81d9 commit ea25e51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scvelo/inference/_metabolic_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def get_counts(gex, labeling_time_mask, obs_dist_argsort, obs_id, neighbors):
# IDs of observations in each labeling time to consider
obs_ids = {
idx: obs_dist_argsort[idx][obs_id, : (val + 1)]
for idx, val in neighbors.iteritems()
for idx, val in neighbors.items()
}
# Stacked counts to consider
counts = np.hstack(
Expand Down Expand Up @@ -452,7 +452,7 @@ def _fit(obs_id: int):
)

_labeling_times = np.hstack(
[[idx] * (val + 1) for idx, val in neighbors.iteritems()]
[[idx] * (val + 1) for idx, val in neighbors.items()]
)

experiment = (
Expand Down

0 comments on commit ea25e51

Please sign in to comment.