Fix resample

 - FIX bug by which `resample(x)` modified the shape of x
 - re-add the axis kwarg for backwards compatibility