The `assert_warns ` function have backported  for user with numpy version < 1.7.  This code will be removed when the minimal numpy required for scikit-learn will be 1.7 or higher.