ResizeRight
ResizeRight copied to clipboard
Numpy path broken with negative padding
The function fw_pad is supposed to perform a crop when called with negative padding values.
However, the numpy codepath raises a ValueError if np.pad() is called with negative values. Specifically, np.pad calls _as_pairs(..., as_index=True) (link) internally which results in the error here.
I have patched the function in my fork, but I'm not sure if my fix is the most elegant.