[MRG] Remove some warnings from test suit#5283
[MRG] Remove some warnings from test suit#5283agramfort merged 2 commits intoscikit-learn:masterfrom
Conversation
There was a problem hiding this comment.
np.arange(100) = [0, ..., 99] (100 elements)
np.arange(100, 200) = [100, ..., 199] (100 elements)
np.arange(101, 200) = [101, ..., 199] (99 elements)The test was asserting the arrays are different because of different sizes, and not because of the shuffling (as expected).
|
besides LGTM |
There was a problem hiding this comment.
What is the issue being raised here? Is ignoring the warning the only way?
There was a problem hiding this comment.
RuntimeWarning: Degrees of freedom <= 0 for slice
np.corrcoef raises a warning when dividing by zero, and return a NaN.
This test verifies that matthews_corrcoef transforms the NaN in zeros, so we can silence the warning
|
Other than my comments, this LGTM. I don't think the best solution to warnings is just squelching them if they can be fixed, because in the future we can't see which warnings have to be fixed. |
|
I fixed the warnings without using |
|
With my comments addressed, this LGTM. |
|
Thanks for the review ! |
[MRG] Remove some warnings from test suit
|
thanks @TomDLT ! |
I removed some warnings from the test suit.
Issue #5089
Complementary work #5277