Skip to content

Commit

Permalink
Fix 'divide by zero' error
Browse files Browse the repository at this point in the history
  • Loading branch information
bosborne committed Feb 24, 2024
1 parent 0c341ca commit bc6e569
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyTMHMM/hmm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def viterbi(sequence,
:return: a tuple consisting of the dynamic programming table and the
optimal path.
"""
np.seterr(divide='ignore')
sequence = sequence.upper()

cdef int no_observations = len(sequence)
Expand Down

0 comments on commit bc6e569

Please sign in to comment.