title: numpy array to scipy.sparse matrix
body: <p>Given an arbitrary numpy array (<code>ndarray</code>), is there a function or a short way to convert it to a <code>scipy.sparse</code> matrix?  </p>
  
  <p>I'd like something that works like:</p>
  
  <pre><code>A = numpy.array([0,1,0],[0,0,0],[1,0,0])
  S = to_sparse(A, type="csr_matrix")
  </code></pre>