Contents:
libpysal.weights.
comb
Combinations of size n taken from items
items to be drawn from
size of combinations to take from items
combinations of size n taken from items
Examples
>>> x = range(4) >>> for c in comb(x, 2): ... print(c) ... [0, 1] [0, 2] [0, 3] [1, 2] [1, 3] [2, 3]