def q6(vector, n):
    """
    Revertse the input vector in chunks of size n

    Args:
        vector (1xd): The array to be reversed
        n (int): chunk size

    Returns:
        Array: reversed array
    """
    
    new_vector = []
    while len(vector):
        new_vector+= vector[-n:]
        vector = vector[:-n]
    return new_vector