Fix bug in cropping width indices

This commit is contained in:
Yin Li 2019-12-11 16:45:14 -05:00
parent 0c4a551354
commit 96b683bfef

View File

@ -94,9 +94,9 @@ def padcrop(fields, width):
x = np.pad(x, width, mode='wrap')
elif (width <= 0).all():
x = x[...,
-width[0, 0] : width[0, 1],
-width[1, 0] : width[1, 1],
-width[2, 0] : width[2, 1],
-width[3, 0] : width[3, 1],
]
else:
raise NotImplementedError('mixed pad-and-crop not supported')