Fix bug in Python 3 related to bunchsize

Need to compute bunchsize with // otherwise
it is converted to float and `range` fails.