title: Numpy memory error creating huge matrix
body: <p>I am using numpy and trying to create a huge matrix.
  While doing this, I receive a memory error</p>
  
  <p>Because the matrix is not important, I will just show the way how to easily reproduce the error. </p>
  
  <pre><code>a = 10000000000
  data = np.array([float('nan')] * a)
  </code></pre>
  
  <p>not surprisingly, this throws me <code>MemoryError</code></p>
  
  <p>There are two things I would like to tell:</p>
  
  <ol>
  <li>I really need to create and to use a big matrix</li>
  <li>I think I have enough RAM to handle this matrix (I have 24 Gb or RAM)</li>
  </ol>
  
  <p>Is there an easy way to handle big matrices in numpy?</p>
  
  <p>Just to be on the safe side, I previously read these posts (which sounds similar):</p>
  
  <p><a href="https://stackoverflow.com/questions/1053928/python-numpy-very-large-matrices">Very large matrices using Python and NumPy</a></p>
  
  <p><a href="https://stackoverflow.com/questions/4318615/python-numpy-memoryerror">Python/Numpy MemoryError</a></p>
  
  <p><a href="https://stackoverflow.com/questions/14551451/processing-a-very-very-big-data-set-in-python-memory-error">Processing a very very big data set in python - memory error</a></p>
  
  <p><strong>P.S. apparently I have some problems with multiplication and division</strong> of numbers, which made me think that I have enough memory. So I think it is time for me to go to sleep, review math and may be to buy some memory.</p>
  
  <p>May be during this time some genius might come up with idea how to actually create this matrix using only 24 Gb of Ram. </p>
  
  <p><strong>Why I need this big matrix</strong>
  I am not going to do any manipulations with this matrix. All I need to do with it is to save it into <a href="http://www.pytables.org/moin" rel="noreferrer">pytables</a>. </p>