Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt code to newer networkx version #14

Open
steve725 opened this issue Jan 22, 2022 · 1 comment
Open

Adapt code to newer networkx version #14

steve725 opened this issue Jan 22, 2022 · 1 comment

Comments

@steve725
Copy link

Hi,
I'm using networkx 2.6.1 and got two errors in pytopkapi/pretreatment.py.
To fix the errors I had to change:

  • change line 194:
    from
    ar_label_sort = np.array(nx.topological_sort(network_dag))
    to
    ar_label_sort = np.array(list(nx.topological_sort(network_dag)))

  • change line 201:
    from
    dag_copy = nx.copy.deepcopy(network_dag)
    to
    dag_copy = network_dag.copy()

@JustinPringle
Copy link

heavens above! thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants