Skip to content

Commit 0c341ca

Browse files
committed
Correct deprecation warning
1 parent 4fed6a5 commit 0c341ca

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pyTMHMM/hmm.pyx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,8 @@ def viterbi(sequence,
3535
transitions = np.log(transitions)
3636
emissions = np.log(emissions)
3737

38-
# Divide by zero warning is likely here
39-
cdef np.ndarray[DTYPE_t, ndim=2] M = \
40-
np.zeros([2, no_states],dtype=DTYPE)
41-
cdef np.ndarray[np.int_t, ndim=2] P = \
42-
np.zeros([no_observations, no_states], dtype=int)
43-
38+
cdef np.ndarray[DTYPE_t, ndim=2] M = np.zeros([2, no_states],dtype=DTYPE)
39+
cdef np.ndarray[np.int_t, ndim=2] P = np.zeros([no_observations, no_states], dtype=int)
4440
cdef unsigned int i, j, k, max_state, next_state, observation
4541
cdef double max_state_prob, prob
4642

0 commit comments

Comments
 (0)