@@ -171,10 +171,9 @@ def test_brain_models():
171171
172172 # Test the constructor
173173 bm_vox = axes .BrainModel ('thalamus_left' , voxel = np .ones ((5 , 3 ), dtype = int ), affine = np .eye (4 ), volume_shape = (2 , 3 , 4 ))
174- print (bm_vox .name )
175- assert np .all (bm_vox .name == np .full (5 , 'CIFTI_STRUCTURE_THALAMUS_LEFT' ))
176- assert np .all (bm_vox .vertex == np .full (5 , - 1 ))
177- assert np .all (bm_vox .voxel == np .full ((5 , 3 ), 1 ))
174+ assert np .all (bm_vox .name == ['CIFTI_STRUCTURE_THALAMUS_LEFT' ] * 5 )
175+ assert np .array_equal (bm_vox .vertex , np .full (5 , - 1 ))
176+ assert np .array_equal (bm_vox .voxel , np .full ((5 , 3 ), 1 ))
178177 with assert_raises (ValueError ):
179178 # no volume shape
180179 axes .BrainModel ('thalamus_left' , voxel = np .ones ((5 , 3 ), dtype = int ), affine = np .eye (4 ))
@@ -195,9 +194,9 @@ def test_brain_models():
195194 axes .BrainModel ('thalamus_left' , voxel = np .ones ((5 , 2 ), dtype = int ), affine = np .eye (4 ), volume_shape = (2 , 3 , 4 ))
196195
197196 bm_vertex = axes .BrainModel ('cortex_left' , vertex = np .ones (5 , dtype = int ), nvertices = {'cortex_left' : 20 })
198- assert np .all (bm_vertex .name == np . full ( 5 , 'CIFTI_STRUCTURE_CORTEX_LEFT' ) )
199- assert np .all (bm_vertex .vertex == np .full (5 , 1 ))
200- assert np .all (bm_vertex .voxel == np .full ((5 , 3 ), - 1 ))
197+ assert np .array_equal (bm_vertex .name , [ 'CIFTI_STRUCTURE_CORTEX_LEFT' ] * 5 )
198+ assert np .array_equal (bm_vertex .vertex , np .full (5 , 1 ))
199+ assert np .array_equal (bm_vertex .voxel , np .full ((5 , 3 ), - 1 ))
201200 with assert_raises (ValueError ):
202201 axes .BrainModel ('cortex_left' , vertex = np .ones (5 , dtype = int ))
203202 with assert_raises (ValueError ):
0 commit comments