Pep8 numpy random

Rebased for backport to 1.9.x if wanted. Also fixed a FutureWarning in numpy.random.choice.