Skip to content

Commit 1a22a38

Browse files
committed
Add networkx dep
1 parent 64fc60b commit 1a22a38

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
- name: Build and install Sparse
101101
run: |
102102
pip install -U setuptools wheel
103-
python -m pip install '.[finch]' scipy
103+
python -m pip install '.[finch]' scipy networkx
104104
- name: Run examples
105105
run: |
106106
source ci/test_examples.sh

examples/pagerank_example.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import importlib
2+
import os
13
import time
24

35
import sparse
@@ -54,6 +56,9 @@ def pagerank(G, alpha=0.85, max_iter=100, tol=1e-6) -> dict:
5456
G = nx.DiGraph(nx.path_graph(4))
5557
ITERS = 3
5658

59+
os.environ[sparse._ENV_VAR_NAME] = "Finch"
60+
importlib.reload(sparse)
61+
5762
# compile
5863
pagerank(G)
5964
print("compiled")

0 commit comments

Comments
 (0)