Skip to content

Commit

Permalink
Skip nan in phase
Browse files Browse the repository at this point in the history
  • Loading branch information
nspope committed Jul 17, 2024
1 parent 63bc3e0 commit 3dbc308
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tsdate/phasing.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from .approx import _f
from .approx import _f1r
from .approx import _f2w
from .approx import _i
from .approx import _i1r
from .approx import _i1w
from .approx import _i2r
Expand Down Expand Up @@ -66,6 +65,9 @@ def reallocate_unphased(
i, j = blocks_edges[b]
assert tskit.NULL < i < num_edges and edges_unphased[i]
assert tskit.NULL < j < num_edges and edges_unphased[j]
if np.isnan(mutations_phase[m]): # DEBUG
print("ERR skip nan in phase")
continue
assert 0.0 <= mutations_phase[m] <= 1.0
edges_likelihood[i, 0] += mutations_phase[m]
edges_likelihood[j, 0] += 1 - mutations_phase[m]
Expand Down

0 comments on commit 3dbc308

Please sign in to comment.