Kalanand's August 2014 Log

   July 2014   
August 2014
SuMoTuWeThFrSa
     12
3456789
10111213141516
17181920212223
24252627282930
31      
   September 2014   

August 1st

C++ Containers Cheat Sheet

Here is a quick summary of which STL containers to use in different usage scenarios.

For a long opinionated discussion see this thread on Stack Overflow.

August 12th

Generating dense matrix from a sparse matrix in numpy python

Here is a nice example again from Stack Overflow
 from scipy.sparse import csr_matrix
 A = csr_matrix([[1,0,2],[0,3,0]])
 >>>A
 <2x3 sparse matrix of type '<type 'numpy.int64'>'
    with 3 stored elements in Compressed Sparse Row format
 >>> A.todense()
   matrix([[1, 0, 2],
           [0, 3, 0]])
 >>> A.toarray()
      array([[1, 0, 2],
            [0, 3, 0]])

Go to July's log


Last modified: Wed Aug 27 15:24:29 CDT 2014