# Revision history [back]

Hi,

If you just want the digraph, without the weights you can use

sage: D=DiGraph(M,format='incidence_matrix')


If you want to incorporate weights, you can try something like

sage: A=Matrix(ZZ,[[0,0,0,1,2,3],[0,0,0,4,5,6],[0,0,0,7,8,9],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0]])