title: Wrong fit using scipy curve_fit
body: <p>I am trying to fit some data to a power law function with exponential cut off. I generate some data with numpy and i am trying to fit those data with scipy.optimization. 
  Here is my code:</p>
  
  <pre><code>import numpy as np
  from scipy.optimize import curve_fit
  
  def func(x, A, B, alpha):
      return A * x**alpha * np.exp(B * x)
  
  xdata = np.linspace(1, 10**8, 1000)
  ydata = func(xdata, 0.004, -2*10**-8, -0.75)
  popt, pcov = curve_fit(func, xdata, ydata)
  print popt
  </code></pre>
  
  <p>The result of I am getting is: [1, 1, 1] which does not correspond with the data.
  ¿Am i doing something wrong?</p>