Getting a transition matrix from a Adjacency matrix in python I have a 3*3 Adjacency matrix and I'm trying to sum the elements of each column and divide each column element by that sum to get the transition matrix. Can you please help me code this part? Thanks in advance.
Considering a is your adjacency matrix 2D numpy array :

a / a.sum(axis=0)


Should do the trick (divide all elements by columns sum)