[WIP] improving equality test in sklearn's clone function#5525
[WIP] improving equality test in sklearn's clone function#5525dohmatob wants to merge 1 commit intoscikit-learn:masterfrom
Conversation
sklearn/tests/test_base.py
Outdated
There was a problem hiding this comment.
I would rather raise a SkipTest('pandas required') exception to make it more explicit that this test was not run.
There was a problem hiding this comment.
yes indeed. thanks.
|
|
|
@ogrisel: No, |
sklearn/tests/test_base.py
Outdated
There was a problem hiding this comment.
we have a mock dataframe object.
|
I am not sure I understand why this works. maybe @GaelVaroquaux can say something about it. Shouldn't we be deepcopying the dataframe? We deepcopy numpy arrays, right? |
There was a problem hiding this comment.
The fix looks good (although it took me a minute to realize why :) )
|
We deepcopy everything that is not an estimator (line 49 of base.py). |
|
yeah but why is |
|
yeah but why is is true after deepcopying something?
I don't understand your question.
|
|
Argh... so both me and @GaelVaroquaux where a little unclear on what is happening here. I'll post the correct fix in a minute. |
|
I think #5540 is a better fix. |
This PR addresses issue #5522.