TypeError: adj() got an unexpected keyword argument 'scipy_fmt'

Hi,
I’m new with DGL, and when I run my code about positional encoding, I got this error:
TypeError: adj() got an unexpected keyword argument 'scipy_fmt'

The code I run:

    # A = g.adjacency_matrix_scipy(return_edge_ids=False).astype(float)
    A = g.adj(scipy_fmt='csr')
    # A = g.adj()
    N = sp.diags(dgl.backend.asnumpy(g.in_degrees()).clip(1) ** -0.5, dtype=float)
    L = sp.eye(g.number_of_nodes()) - N * A * N

My DGL version is 1.1.0+cu113

Any clue is helpful ! Thanks a lot.

Actually, in DGL 1.1, g.adj() is replaced by g.adj_external().

Chech out here

Here is official docs of adj_external().

Hi, is your question addressed now?

Yes, everything is alright.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.