`step = n_samples / n_classes` is safer with py3k
 (Sorry to repeat, but you might not have seen it)