title: Fit function hmmlearn doesn't work: fit() takes 2 positional arguments but 3 were given
body: <p>I am trying to run a hidden markov model, however the fit function doesn't work properly.</p>
  
  <p>Code:</p>
  
  <pre><code>import numpy as np
  from hmmlearn import hmm
  
  X1 = [[0.5], [1.0], [-1.0], [0.42], [0.24]]
  X2 = [[2.4], [4.2], [0.5], [-0.24]]
  
  X = np.concatenate([X1, X2])
  lengths = [len(X1), len(X2)]
  
  hmm.GaussianHMM(n_components=3).fit(X, lengths) 
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-16-cdfada1be202&gt; in &lt;module&gt;()
        8 lengths = [len(X1), len(X2)]
        9 
  ---&gt; 10 hmm.GaussianHMM(n_components=3).fit(X, lengths)
  
  TypeError: fit() takes 2 positional arguments but 3 were given
  </code></pre>