Skip to content

Commit 3ffb803

Browse files
committed
[TEST] Test int parcels_to_vertices
1 parent 84a7023 commit 3ffb803

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

netneurotools/tests/test_freesurfer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ def test_project_reduce_vertices(cammoun_surf, scale, parcels):
6767
reduced = freesurfer.vertices_to_parcels(projected, rhannot=rh, lhannot=lh)
6868
assert np.allclose(data, reduced)
6969

70+
# what about int arrays as input?
71+
data = np.random.choice(10, size=parcels)
72+
projected = freesurfer.parcels_to_vertices(data, rhannot=rh, lhannot=lh)
73+
reduced = freesurfer.vertices_to_parcels(projected, rhannot=rh, lhannot=lh)
74+
assert np.allclose(reduced, data)
75+
7076
# number of parcels != annotation spec
7177
with pytest.raises(ValueError):
7278
freesurfer.parcels_to_vertices(np.random.rand(parcels + 1),

0 commit comments

Comments
 (0)