Skip to content

Commit

Permalink
Correct deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bosborne committed Sep 13, 2021
1 parent e39a1f8 commit 4fed6a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyTMHMM/hmm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ def viterbi(sequence,
transitions = np.log(transitions)
emissions = np.log(emissions)

# Divide by zero warning is likely here
cdef np.ndarray[DTYPE_t, ndim=2] M = \
np.zeros([2, no_states],dtype=DTYPE)
cdef np.ndarray[np.int_t, ndim=2] P = \
np.zeros([no_observations, no_states], dtype=np.int)
np.zeros([no_observations, no_states], dtype=int)

cdef unsigned int i, j, k, max_state, next_state, observation
cdef double max_state_prob, prob
Expand Down

0 comments on commit 4fed6a5

Please sign in to comment.