def reshape_array(array, new_len):
    """
    array: shape= [M,N]
    new_len: the length of the new array, the reshaped shape will be [M//new_len, new_len, N]

    """
    M, N = array.shape
    m = M // new_len
    return array[: m * new_len, :].reshape([m, new_len, N])