Switches from python to numpy

Substitutes numpy.random.choice from python’s random.sample. This will
coerce data to be numpy vectors.

It should also hopefully fix the Python 3 compatibility issues.

Also moves the test functions to a more appropriate folder.