title: curve_fit failing on even a sine wave
body: <p>I'm trying to use <code>curve_fit</code> to fit a simple sine wave (not even with any noise) as a test before I move on to more complex problems. Unfortunately it's not giving even remotely the right answer. Here's my syntax:</p>
  
  <pre><code>x = linspace(0,100,300)
  y = sin(1.759*x)
  def mysine(x, a):
      return sin(a*x)
  
  popt, pcov = curve_fit(mysine, x, y)
  popt
  array([ 0.98679056])
  </code></pre>
  
  <p>And then if I try an initial guess (say 1.5):</p>
  
  <pre><code>popt, pcov = curve_fit(mysine, x, y, p0=1.5)
  popt
  array([ 1.49153365])
  </code></pre>
  
  <p>... which is still nowhere near the right answer. </p>
  
  <p>I guess I'm surprised that, given how well the function is sampled, the fit doesn't work well. </p>