If you want to assign people to groups randomly, why not just something like:
import random
import numpy
people = [...]
min_size = 3
random.shuffle(people)
groupings = numpy.array_split(people,len(people)//min_size)