fix behavior of `partition`

should only return a final partition shorter than `size` if a `padding`
argument is supplied