Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianIsensee committed Apr 12, 2019
1 parent 813967a commit 82383d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion batchgenerators/augmentations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ def pad_nd_image(image, new_shape=None, mode="constant", kwargs=None, return_sli
pad_above = difference // 2 + difference % 2
pad_list = [[0, 0]]*num_axes_nopad + list([list(i) for i in zip(pad_below, pad_above)])

if (not all([[i == 0] for i in pad_below])) and (not all([[i == 0] for i in pad_above])):
if not ((all([i == 0 for i in pad_below])) and (all([i == 0 for i in pad_above]))):
res = np.pad(image, pad_list, mode, **kwargs)
else:
res = image
Expand Down

0 comments on commit 82383d0

Please sign in to comment.