V. Armando Solé wrote: Sorry, there was a bug in the sent code. It should be: > import numpy > a=numpy.arange(100.) > a.shape = 10, 10 > b = a * 1 # just to get a copy > b.shape = 5, 2, 5, 2 > b = (b.sum(axis=3)).sum(axis=1) > > In that way, on b I have a binned image of a.