DGLGraph.adjacency_matrix_scipy(transpose=False, fmt='csr')[source]

Return the scipy adjacency matrix representation of this graph.

By default, a row of returned adjacency matrix represents the destination of an edge and the column represents the source.

When transpose is True, a row represents the source and a column represents a destination.

The elements in the adajency matrix are edge ids.

  • transpose (bool, optional (default=False)) – A flag to transpose the returned adjacency matrix.
  • fmt (str, optional (default='csr')) – Indicates the format of returned adjacency matrix.

The scipy representation of adjacency matrix.

Return type: