title: Storing scipy sparse matrix as HDF5
body: <p>I want to compress and store a humongous Scipy matrix in HDF5 format. How do I do this? I've tried the below code:</p>
  
  <pre><code>a = csr_matrix((dat, (row, col)), shape=(947969, 36039))
  f = h5py.File('foo.h5','w')    
  dset = f.create_dataset("init", data=a, dtype = int, compression='gzip')
  </code></pre>
  
  <p>I get errors like these,</p>
  
  <pre><code>TypeError: Scalar datasets don't support chunk/filter options
  IOError: Can't prepare for writing data (No appropriate function for conversion path)
  </code></pre>
  
  <p>I can't convert it to numpy array as there will be memory overflow. What is the best method?</p>