FIX silence numpy 1.8 warning for using non integer
Merge pull request #2656 from arjoly/np1.8-warnings

[MRG] FIX silence numpy 1.8 warning for using non integer