-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update type annotations in hmm inference code.
Major changes: - Fix an error in `_compute_all_transition_probs` which caused the return array to be too short. - The `filtered_probs` were being truncated twice instead of once. - Replace `jaxtyping.Int` with `dynamax.typing.IntScalar` or `int` - this reflects when integer scalar arrays are accepted - `jaxtyping.[Dtype]` cannot be used directly for type checking instead they must be used as part of an array. - Fix the shape of `transition_matrix`: - if transition_matrix has a leading timestep axis it should be of length T-1 not of length T. - Add annotation indicating that `transition_matrix` is an optional argument - Raise ValueError when neither `transition_matrix` or `transition_fn` provided.
- Loading branch information
Showing
1 changed file
with
55 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters