Skip to content

Commit

Permalink
allow for interger mu in simulate_poiszero_hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
xjing76 committed Jun 25, 2020
1 parent cd02908 commit f761419
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import numpy as np
from pymc3_hmm.distributions import HMMStateSeq, SwitchingProcess

import numpy as np
import theano.tensor as tt

import pymc3 as pm

from pymc3_hmm.distributions import HMMStateSeq, SwitchingProcess

import pandas as pd
import numbers


def simulate_poiszero_hmm(N, mus=np.r_[10.0, 30.0],
pi_0_a=np.r_[1, 1, 1],
Gamma=np.r_['0,2,1',
[5, 1, 1],
[1, 3, 1],
[1, 1, 5]]
pi_0_a=np.r_[1, 1],
Gamma=np.r_['0,2', [5, 1], [1, 3]]
):
if isinstance(mus, numbers.Number):
mus = np.r_[mus]
assert pi_0_a.size == mus.size + 1 == Gamma.shape[0] == Gamma.shape[1]

with pm.Model() as test_model:
Expand Down

0 comments on commit f761419

Please sign in to comment.