I have a 2D tensor and I am trying to reduce it by taking average of every 4 columns. For numpy arrays this can be done by using the block_reduce function from skimage.measure m