Changed the input type to int - this should be more efficient and more clear that the input type is ranks and not some other measure. Also fixed a small bug in the python ranking code