import itertools


def get_indices(size):
    """Get indices for dimension.
    """
    if len(size) == 0:
        return tuple()
    elif len(size) == 1:
        return range(size[0])
    else:
        return itertools.product(range(size[0]), range(size[1]))