You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
snkit has networkx as an optional dependency. If you don't have networkx, but try to use functions that require it, snkit tries to raise an import error. However, there are type hints in function signatures in network.py that use networkx and therefore when importing snkit without networkx, snkit fails on load with the following:
Python 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0] on linux
>>> import snkit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/fred/micromamba/envs/jamaica-infrastructure/lib/python3.10/site-packages/snkit/__init__.py", line 7, in <module>
from snkit.network import Network
File "/home/fred/micromamba/envs/jamaica-infrastructure/lib/python3.10/site-packages/snkit/network.py", line 964, in <module>
) -> Union[nx.Graph, nx.DiGraph]:
NameError: name 'nx' is not defined. Did you mean: 'np'?
The text was updated successfully, but these errors were encountered:
snkit
hasnetworkx
as an optional dependency. If you don't havenetworkx
, but try to use functions that require it,snkit
tries to raise an import error. However, there are type hints in function signatures in network.py that usenetworkx
and therefore when importingsnkit
withoutnetworkx
,snkit
fails on load with the following:The text was updated successfully, but these errors were encountered: