sailfish.subdivide.partition

sailfish.subdivide.partition(elements, num_parts)[source]

Equitably divide the given number of elements into num_parts partitions.

The sum of the partitions is elements. The number of partitions must be less than or equal to the number of elements.