Numpy 1.8.0 compatibility.

NumPy 1.8.0 has deprecated use of non-integer integers (e.g., 1.0 instead of 1) in places where integers are expected, such as array indices. This change fixes any non-integer usage so that the tests all pass.

I did not audit every single place a non-integer integer may occur (I'm not sure there would be a simple way to find them anyway), so if a test didn't trigger it, it might not have been fixed.