Skip to content

Commit a87853d

Browse files
committed
TEST: Fix failing test_image_api tests for new BV test files.
1 parent 4699742 commit a87853d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

nibabel/brainvoyager/bv_vtc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def set_data_shape(self, shape=None, zyx=None, t=None):
9292
if (shape is None) and (zyx is None) and (t is None):
9393
raise HeaderDataError('Shape, zyx, or t needs to be specified!')
9494
if ((t is not None) and (t < 0)) or \
95-
((shape is not None) and (shape[3] < 0)):
95+
((shape is not None) and (len(shape) == 4) and (shape[3] < 0)):
9696
raise HeaderDataError('VTC files need at least one volume!')
9797
if shape is not None:
9898
# Use zyx and t parameters instead of shape.

nibabel/brainvoyager/tests/test_bv_vmp.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
is_proxy=True),
5353
dict(
5454
fname=pjoin(data_path, 'test3.vmp'),
55-
shape=(1, 10, 10, 10),
55+
shape=(1, 5, 4, 3),
5656
dtype=np.float32,
57-
affine=np.array([[-3., 0, 0, -21.],
58-
[0, 0, -3., -21.],
59-
[0, -3., 0, -21.],
57+
affine=np.array([[-2., 0, 0, 122.],
58+
[0, 0, -2., 46.],
59+
[0, -2., 0, 140.],
6060
[0, 0, 0, 1.]]),
61-
zooms=(3., 3., 3.),
61+
zooms=(2., 2., 2.),
6262
fileformat=BvVmpImage,
6363
# These values are from NeuroElf
6464
data_summary=dict(

0 commit comments

Comments
 (0)