'Get the parameters that would be ``ind``th in iteration
Parameters
ind : int
The iteration index
Returns
params : dict of string to any
Equal to list(self)[ind]'

def __getitem__(self, ind):

    for sub_grid in self.param_grid:
        if (not sub_grid):
            if (ind == 0):
                return {}
            else:
                ind -= 1
                continue
        (keys, values_lists) = zip(*sorted(sub_grid.items())[::(-1)])
        sizes = [len(v_list) for v_list in values_lists]
        total = np.product(sizes)
        if (ind >= total):
            ind -= total
        else:
            out = {}
            for (key, v_list, n) in zip(keys, values_lists, sizes):
                (ind, offset) = divmod(ind, n)
                out[key] = v_list[offset]
            return out
    raise IndexError('ParameterGrid    index    out    of    range')
