Skip to content

Commit

Permalink
Make doctests compatible with i386/Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Mar 14, 2017
1 parent 957360f commit 998294a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions skan/csr.py
Expand Up @@ -532,9 +532,9 @@ def compute_centroids(image):
>>> image = np.array([[1, 0, 1, 0, 0, 1, 1],
... [1, 0, 0, 1, 0, 0, 0]])
>>> labels, centroids = compute_centroids(image)
>>> labels
array([[1, 0, 2, 0, 0, 3, 3],
[1, 0, 0, 2, 0, 0, 0]], dtype=int32)
>>> print(labels)
[[1 0 2 0 0 3 3]
[1 0 0 2 0 0 0]]
>>> centroids
array([[ 0.5, 0. ],
[ 0.5, 2.5],
Expand Down
4 changes: 2 additions & 2 deletions skan/image_stats.py
Expand Up @@ -27,8 +27,8 @@ def mesh_sizes(skeleton):
... [0, 0, 1, 1, 1],
... [0, 0, 1, 0, 0],
... [0, 1, 0, 1, 0]])
>>> mesh_sizes(image)
array([], dtype=int64)
>>> print(mesh_sizes(image))
[]
>>> from skan.nputil import pad
>>> image2 = pad(image, 1) # make sure mesh not touching border
>>> mesh_sizes(image2) # sizes in row order of first pixel in space
Expand Down

0 comments on commit 998294a

Please sign in to comment.