Backport assert_warns and assert_no_warnings from np 1.7
TST test warning + ENH Add warning average=samples