Skip to content

Commit

Permalink
version dependent networkx (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdpedigo authored Nov 14, 2024
1 parent acbc7c8 commit 069fac7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion caveclient/chunkedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import numpy as np
import pandas as pd
import pytz
from packaging.version import Version

from .auth import AuthClient
from .base import (
Expand Down Expand Up @@ -996,7 +997,10 @@ def get_lineage_graph(
]

if as_nx_graph:
return nx.node_link_graph(r, edges="links")
if Version(nx.__version__) >= Version("3.4"):
return nx.node_link_graph(r, edges="links")
else:
return nx.node_link_graph(r)
else:
return r

Expand Down

0 comments on commit 069fac7

Please sign in to comment.