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 4fed6a5 commit 0c341ca
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pyTMHMM/hmm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ 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=int)

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=int)
cdef unsigned int i, j, k, max_state, next_state, observation
cdef double max_state_prob, prob

Expand Down

0 comments on commit 0c341ca

Please sign in to comment.