Closed AlexanderRuesch closed 9 years ago
Thank you, I took a look into this.
The bug stems from the way the padded areas are filled in the case of the modes mirror, reflect and warp: Since the values from the original array are used for filling, they run out of values for size > 2*array.shape
for any dimension.
This will be very seldom the case. For now, I've changed the function to raise an Exception when the requirement is not met. You can find the fix in the latest version of MedPy on GitHub.
Since the function is to be replaced by numpy's native pad function, I won't fix this bug.
Best, loli
When the pad function is called with
mode='mirror'
andsize >> image.shape
the returned array starts with lines of zeros.Example: