Skip to content

Commit

Permalink
avoid devision by zero (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
katosh committed Apr 22, 2024
1 parent 5801a16 commit 12e363b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/palantir/presults.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,9 @@ def select_branch_cells(
prob_thresholds = np.empty_like(fate_probs)
n = fate_probs.shape[0]

step = n // PSEUDOTIME_RES
pseudotime_resolution = min(PSEUDOTIME_RES, n)

step = n // pseudotime_resolution
nsteps = n // step
for i in range(nsteps):
l, r = i * step, (i + 1) * step
Expand Down

0 comments on commit 12e363b

Please sign in to comment.