To support arbitrary patch sizes with zero padding but retain n-D generality, this utility function may be of use: 

``` python
def _pad_asymmetric_zeros(arr, pad_amt, axis=-1):
    """Pads `arr` by `pad_amt` along specified `axis`"""
    if axis == -1:
        axis = arr.ndim - 1

    zeroshape = tuple([x if i != axis else pad_amt
                       for (i, x) in enumerate(arr.shape)])

    return np.concatenate((arr, np.zeros(zeroshape, dtype=arr.dtype)),
                          axis=axis)
```
Check each axis and if patch size does not divide evenly, apply this with appropriate `pad_amt`.