title: Python Memory Error (Unix vs Windows)
body: <p>I am developing an application which loads big JPEG2000 images and converts them to TIF. Later on, it extracts the pixel data and there is some processing. It perfectly works except in one case:</p>
  
  <p>When I load the biggest image and extract the data (10956x10956 array) the program crashes but it only crashes on Windows -- never on Linux. (I'd like a portable application).</p>
  
  <p>I detected the problem and it is because of a memory error when interpolating 20x20 to the image sampling.</p>
  
  <pre><code>f=RectBivariateSpline(x,y,Sun_angles)
  
  xnew = numpy.linspace(x.min(),x.max(),rows)
  
  ynew = numpy.linspace(y.min(),y.max(),columns)
  
  Sun_angles_new = f(xnew, ynew) #here it crashes
  </code></pre>
  
  <p>I also tried with <code>interp2d</code> and <code>mapcoordinates</code> and I got the same result.</p>
  
  <p>Python is supposed to be completely portable but I've got the impression is optimised for Unix systems (see also: <a href="https://stackoverflow.com/questions/3765178/running-python-on-a-windows-machine-vs-linux">Running python on a Windows machine vs Linux</a>)</p>
  
  <p>Note: I run the program on two different computers but with the same processor and RAM.</p>
  
  <p>Therefore... what could be the reason? And is there any other interpolation with less memory consumption?</p>
  
  <p>Note: One solution is dividing the image in tiles and interpolate.</p>