Stencil operators for ndarrays