title: how to run hidden markov models in Python with hmmlearn?
body: <p>I tried to use <a href="https://github.com/hmmlearn/hmmlearn" rel="nofollow">hmmlearn from GitHub</a> to run a binary hidden markov model. This does not work:</p>
  
  <pre><code>import hmmlearn.hmm as hmm
  transmat = np.array([[0.7, 0.3],
                        [0.3, 0.7]])
  emitmat = np.array([[0.9, 0.1],
                      [0.2, 0.8]])
  obs = np.array([0, 0, 1, 0, 0])
  startprob = np.array([0.5, 0.5])
  h = hmm.MultinomialHMM(n_components=2, startprob=startprob,
                         transmat=transmat)
  h.emissionprob_ = emitmat
  # fails
  h.fit([0, 0, 1, 0, 0])
  # fails
  h.decode([0, 0, 1, 0, 0])
  print h
  </code></pre>
  
  <p>I get this error: </p>
  
  <blockquote>
    <p><strong>ValueError:</strong> zero-dimensional arrays cannot be concatenated</p>
  </blockquote>
  
  <p>What is the right way to use this module? Note I am using the version of hmmlearn that was separated from sklearn, because apparently sklearn doesn't maintain hmmlearn anymore.</p>