title: Matlab Sparse function v.s. Python Scipy.sparse library
body: <p>I am translating Matlab code into Python environment, and now handling with sparse function in Matlab. I know that we have the library called <code>scipy.sparse</code> and the one of them such that <code>csc_matrix((data, (row_ind, col_ind)), [shape=(M, N)])</code>.</p>
  
  <p>However, when I check those computed from <code>scipy.sparse</code> library, they don't match the one from Matlab.
  I have big data sized of 1693872 called <code>Ig</code> (1693872,), <code>Jg</code>(1693872,), and <code>K_dummy</code> (1693872,), where <code>K_dummy(Ig(i),Jg(i)) = K_dummy(i)</code>. </p>
  
  <p>I have already check all the variables, <code>Ig</code>, <code>Jg</code>, <code>K_dummy</code> with Matlab and matches perfectly. Do you guys have any idea that I have to consider other aspects?</p>
  
  <p>Here is my sample code in python and Matlab, respectively as references:</p>
  
  <pre><code>K = csc_matrix((K_dummy.flatten('F'),(Ig.flatten('F')-1,Jg.flatten('F')-1)),shape=(noDofs,noDofs))
  
  K = sparse(Ig(:),Jg(:),K_dummy_python(:),noDofs,noDofs);
  </code></pre>
  
  <p>where <code>K_dummy</code> is (18, 18, 5228) array, <code>Ig</code> is (324, 5228) array, <code>Jg</code> is (324, 5228) array, and <code>noDofs</code> is an int variable as 42442.</p>