Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dohmatob
Copy link
Contributor

This PR addresses issue #5522.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather raise a SkipTest('pandas required') exception to make it more explicit that this test was not run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes indeed. thanks.

@ogrisel
Copy link
Member

ogrisel commented Oct 22, 2015

clone would have the same problem with a numpy array passed as an input parameter right? Testing this would not require the dependency on pandas at test time.

@dohmatob
Copy link
Contributor Author

@ogrisel: No, ndarrays are handled separately in the function.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a mock dataframe object.

@amueller
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good (although it took me a minute to realize why :) )

@GaelVaroquaux
Copy link
Member

We deepcopy everything that is not an estimator (line 49 of base.py).

@amueller
Copy link
Member

yeah but why is is true after deepcopying something?

@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Oct 22, 2015 via email

@amueller
Copy link
Member

Argh... so both me and @GaelVaroquaux where a little unclear on what is happening here. I'll post the correct fix in a minute.

@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

I think #5540 is a better fix.

@ogrisel ogrisel changed the title [WIP] improving equality test inf sklearn's cloning function [WIP] improving equality test in sklearn's clone function Oct 23, 2015
@dohmatob dohmatob closed this Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants