mvpa2.misc.support.unique_combinations

mvpa2.misc.support.unique_combinations(L, n, sort=False)

Return unique combinations form a list L of objects in groups of size n.

Parameters:

L : list

list of unique ids

n : int

length of the subsets to return

sort : bool, optional

if True – result is sorted before returning

If you are intended to use only a small subset of possible :

combinations, it is advised to use a generator :

`xunique_combinations`. :