title: Checking if a scipy sparse matrix is CSC or CSR
body: <p>I would like to know the best way to check if a scipy sparse matrix, if CSC or CSR. Right now I'm using.</p>
  
  <pre><code>rows, cols = X.shape()
  indptr = X.indptr()
  if len(indptr) == cols + 1:
      print "csc"
  else:
      print "csr"
  </code></pre>
  
  <p>Thanks.</p>