Skip to content

Commit 62ca24d

Browse files
authored
Use networkx 2.7 and replace deprecated fcn (#189)
Fix #187
1 parent d988408 commit 62ca24d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

requirements/default.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
numpy>=1.11
22
scipy>=0.18
3-
networkx>=1.11
3+
networkx>=2.7
44
numba>=0.29
55
pandas>=0.24
66
openpyxl>=2.4

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ include_package_data = True
4848
install_requires =
4949
imageio>=2.0
5050
matplotlib>=3.0
51-
networkx>=2.0
51+
networkx>=2.7
5252
numba>=0.50
5353
numpy>=1.16.5
5454
pandas>=1.0

src/skan/draw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def overlay_skeleton_networkx(
399399
if image is not None:
400400
cmap = cmap or 'gray'
401401
axis.imshow(image, cmap=cmap)
402-
gnx = nx.from_scipy_sparse_matrix(csr_graph)
402+
gnx = nx.from_scipy_sparse_array(csr_graph)
403403
# Note: we invert the positions because Matplotlib uses x/y for
404404
# scatterplot, but the coordinates are row/column NumPy indexing
405405
positions = dict(zip(range(coordinates.shape[0]), coordinates[:, ::-1]))

0 commit comments

Comments
 (0)