def compress_array(array, new_size):
    """Compress array by averaging over fusionned cells"""
    l = len(array)
    k = l / new_size
    new_array = list()
    for i in range(0, l, k):
        val = sum(array[i:i + k]) / k
        new_array.append(val)
    return new_array
