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

Skip to content

[MRG] FIX Avoid default mutable argument in constructor of AgglomerativeClustering #8153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 5, 2017

Conversation

glemaitre
Copy link
Member

Reference Issue

What does this implement/fix? Explain your changes.

As pointed out in #7990, joblib.Memory is mutable. It was used
as a default argument of the constructor of AgglomerativeClustering.

This fix just pass None and initialize at fit time the memory with
the same behaviour as previously implemented.

Any other comments?

@jnothman
Copy link
Member

jnothman commented Jan 5, 2017

Problem with putting in new validation is that now it needs a unit test :P

@GaelVaroquaux
Copy link
Member

Are you sure that it needs a unit test? It's the default argument, hence it is covered in the existing tests.

@jnothman
Copy link
Member

jnothman commented Jan 5, 2017

I mean now there is an error raised if memory is not a str or a Memory, but that line no longer has code coverage. So ideally there would be a test that the right error is raised at the right time if memory=5.

@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Jan 5, 2017 via email

@jnothman jnothman merged commit 0b02125 into scikit-learn:master Jan 5, 2017
@jnothman
Copy link
Member

jnothman commented Jan 5, 2017

Thanks @glemaitre

raghavrv pushed a commit to raghavrv/scikit-learn that referenced this pull request Jan 5, 2017
sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
@Przemo10 Przemo10 mentioned this pull request Mar 17, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
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.

3 participants