Make warp function N-D compatible, and add example to doc string