Fix non-integer usage with numpy.

Numpy 1.8.0 has deprecated use of non-integers in places where integers
are expected, such as array indices.
Merge pull request #704 from QuLogic/numpy180

Numpy 1.8.0 compatibility.
syntax flake8 and ensure double precision