finalization of hmm_evaluate cython implementation