title: Interpolate large data Python
body: <p>I'm working on a Python project that uses <code>NumPy</code> and <code>SciPy</code>. I have the following:</p>
  
  <pre><code>x = numpy.arange(-5,5,0.01)
  y = numpy.arange(-5,5,0.01)
  </code></pre>
  
  <p>I also have a function of <code>x</code> and <code>y</code> such that </p>
  
  <pre><code># fxy = function of x and y in a grid
  # fxy.shape = (y.shape[0], x.shape[0])
  </code></pre>
  
  <p>I want to interpolate <code>fxy</code> such that I have the function values at <code>x</code> and <code>y</code> points that are <code>0.0001</code> or <code>0.001</code> apart, i.e. I want to evaluate the function <code>fxy</code> at</p>
  
  <pre><code>finer_x = numpy.arange(-5,5,0.0001)
  finer_y = numpy.arange(-5,5,0.0001)
  
  # finer_fxy = function of finer_x and finer_y in a grid
  # finer_fxy.shape = (finer_y.shape[0], finer_x.shape[0])
  </code></pre>
  
  <p>I keep trying to use the <code>bisplrep</code> and <code>interp2d</code> functions in <code>scipy.interpolate</code> but I get</p>
  
  <pre><code>File "/usr/lib/python2.7/dist-packages/scipy/interpolate/fitpack.py", line 873, in bisplrep
  tx,ty,nxest,nyest,wrk,lwrk1,lwrk2)
  MemoryError
  </code></pre>
  
  <p>and  </p>
  
  <pre><code>OverflowError: Too many data points to interpolate
  </code></pre>
  
  <p>respectively using those functions. What's the best way to create the interpolated data?</p>