Skip to content

Commit 84c0fd2

Browse files
author
Ben Cipollini
committed
Small code review tweaks.
1 parent e9298cf commit 84c0fd2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

nibabel/funcs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,10 @@ def concat_images(images, check_affines=True, axis=None):
112112
If True, then check that all the affines for `images` are nearly
113113
the same, raising a ``ValueError`` otherwise. Default is True
114114
axis : None or int, optional
115-
If None, concatenates on a new dimension. This rrequires all images
115+
If None, concatenates on a new dimension. This requires all images
116116
to be the same shape).
117117
If not None, concatenates on the specified dimension. This requires
118118
all images to be the same shape, except on the specified dimension.
119-
For 4D images, axis must be between -2 and 3.
120119
Returns
121120
-------
122121
concat_img : ``SpatialImage``

nibabel/tests/test_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ def test_concat():
7373
concat_imgs_kwargs = dict(axis=axis)
7474

7575
# Create expected output
76+
expect_error = False
7677
try:
7778
# Error will be thrown if the np.concatenate fails.
7879
# However, when axis=None, the concatenate is possible
7980
# but our efficient logic (where all images are
8081
# 3D and the same size) fails, so we also
8182
# have to expect errors for those.
82-
expect_error = data0.ndim != data1.ndim
8383
if axis is None: # 3D from here and below
8484
all_data = np.concatenate([data0[..., np.newaxis],
8585
data1[..., np.newaxis]],

0 commit comments

Comments
 (0)