MAINT: be robust to numpy's DeprecationWarning

numpy 1.9 raises a lot of 'VisibleDeprecationWarning', which breaks our
test suite
Merge pull request #3598 from GaelVaroquaux/np_warnings

[MRG+1] MAINT: be robust to numpy's DeprecationWarning