Relative to the question in stackoverflow, I think wrap should pad the array by itself repeat and repeat, but np.pad(array, pad_width, mode='wrap') seems not doing so.
The example I have already posted in stack overflow. I am not sure if this is a bug or implemented this way for reason?
In some conditions, np.pad(mode='wrap) returned something stange, usually it happens at left_pad or right_pad greater than the input array along the axis, especially, when left_pad or right_pad is not integral multiple of array length along the axis.
Relative to the question in stackoverflow, I think wrap should pad the array by itself repeat and repeat, but
np.pad(array, pad_width, mode='wrap')seems not doing so.The example I have already posted in stack overflow. I am not sure if this is a bug or implemented this way for reason?
In some conditions,
np.pad(mode='wrap)returned something stange, usually it happens at left_pad or right_pad greater than the input array along the axis, especially, when left_pad or right_pad is not integral multiple of array length along the axis.