Skip to content

AttributeError: module 'networkx' has no attribute 'from_numpy_matrix' #14

@RylanSchaeffer

Description

@RylanSchaeffer

The given example:

    communities, frames = louvain_method(adj_matrix=adj_matrix)
    ax = draw_communities(adj_matrix, communities)

throws an error: AttributeError: module 'networkx' has no attribute 'from_numpy_matrix'. According to https://stackoverflow.com/a/75284568, it seems like this line is now no longer valid:

https://github.com/shobrook/communities/blob/master/communities/visualization/draw_communities.py#L188

Can you please update the library to use G = nx.from_numpy_array(adj_matrix) instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions