Add axis selection to upsample/downsample functions.