title: Wrap a (latent) sparse matrix as a numpy (dense) array (matrix) in python
body: <p>I'm working with a python library which only accepts <code>numpy.array</code> objects. However, my data is high-dimensional and very sparse and it is very inefficient loading it to memory in order the library gets the whole data. I was thinking in a memory efficient python object wrapping a sparse matrix. I found <code>scipy.sparse</code>, but the method of the library (obviously) rejects the data-type. I'd like that the sparse matrix object were latent (wrapped) behind a numpy object.</p>
  
  <pre><code>In [16]: x
  Out[16]: 
  &lt;3x3 sparse matrix of type '&lt;type 'numpy.float64'&gt;'
     with 6 stored elements in Compressed Sparse Row format&gt;
  
  In [17]: print x
   (0, 0) 1.0
   (0, 2) 2.0
   (1, 2) 3.0
   (2, 0) 4.0
   (2, 1) 5.0
   (2, 2) 6.0
  In [18]: y = wrapping_object(x)
  Out[18]: 
  matrix([[ 1.,  0.,  2.],
          [ 0.,  0.,  3.],
          [ 4.,  5.,  6.]])
  In [19]: library.method(y)
  Out[19]: 
  True
  </code></pre>
  
  <p>I don't know if it is possible. Thank you for alternating or easier suggestions also.</p>