import itertools


def get_all_comb(array, r=None):
    """ Get all combinations of items in the given array
    Specifically used for generating variant combination

    Parameters
    ----------
    array: 1D array. input array
    r: int. The number of items in a combination

    Returns
    -------
    result: List(Tuple). List of combination

    """
    if r is None:
        r = len(array)
    return [_ for i in range(1, r + 1) for _ in itertools.combinations(array, i)]