title: lmfit doesn´t fit one of the parameters
body: <p>I'm trying to fit an exponential function using lmfit, but one of the parameters is never optimized and the algorithm keeps returning a fixed scalar.</p>
  <p>Here's my code:</p>
  <pre><code>from lmfit import Model
  
  def function(t, pf, pe, qf):
      return pf + (pe - pf) * (1 - np.exp(-qf * t))
  
  model = Model(function)
  
  params = model.make_params(pe=x, pf=y, qf=5)
  params['pf'].vary = False
  
  weights = np.linspace(1, 5, len(p))
  
  result = model.fit(data=p, params=params, t=t, weights=weights)
  </code></pre>
  <p>The thing is that the variable pf is fixed, and the others should vary. But at the end the variable &quot;qf&quot; doesn't vary and the algorithm keeps returning the number 5 (which is the initial guess).</p>
  <p>Could anybody help me with this, please?</p>
  <p>Thanks in advance!</p>