Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Skeleton
✓ from skan import Skeleton
✗ import skan.Skeleton
Skeleton is a class in the top-level skan module.
summarise
✓ from skan import summarise
✗ from skan.csr import summarise
summarise is exported from top-level; csr submodule is internal.
draw_overlay
✓ from skan import draw_overlay
✗ from skan.visualise import draw_overlay
draw_overlay is in the top-level skan module as of v0.12.
Basic usage: skeletonise an image and summarise branches.
import numpy as np
from skimage.morphology import skeletonize
from skan import Skeleton, summarise
# Create a binary skeleton (example)
image = np.array([[0,0,0,0,0],
[0,1,1,1,0],
[0,0,0,1,0],
[0,1,1,1,0],
[0,0,0,0,0]], dtype=bool)
skel = skeletonize(image)
# Analyse skeleton
branch_data = summarise(skel)
print(branch_data.head())
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'skan'
skan is not installed.
fixRun `pip install skan`.
ImportError: cannot import name 'Skeleton' from 'skan'
Old version of skan (pre-0.9) where Skeleton was in a submodule.
fixUpgrade skan to at least v0.9.0: `pip install -U skan`. Then use `from skan import Skeleton`.
ValueError: The truth value of an array with more than one element is ambiguous
Passing a multi-channel image instead of a single binary skeleton.
fixEnsure the input to `Skeleton` or `summarise` is a 2D or 3D binary array.
Upgrade
Version history
0.13.1latest on PyPI · released Feb 6, 2026
Audit
Dependencies
numbarequiredRequired for Numba-accelerated functions; version >=0.58 for v0.13+
numpyrequiredArray operations; v0.12+ supports NumPy 2.0
scipyrequiredSparse matrix and morphological operations
networkxoptionalConversion to/from NetworkX graphs
naparioptionalPlugin for visualization; optional