Skip to content

Commit

Permalink
Add testing for Euclidean distance height
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Nov 15, 2016
1 parent bded218 commit 91dffee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions skan/test/test_csr.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@ def test_topograph():
stats = csr.branch_statistics(g, idxs, degimg)
assert stats.shape == (1, 4)
assert_almost_equal(stats[0], [1, 3, 2 * np.sqrt(2), 0])


def test_topograph_summary():
stats = csr.summarise(topograph1d, spacing=2.5)
assert stats.loc[0, 'euclidean-distance'] == 5.0
assert_almost_equal(stats.loc[0, ['coord-0-0', 'coord-0-1',
'coord-1-0', 'coord-1-1']],
[3, 0, 3, 5])

0 comments on commit 91dffee

Please sign in to comment.