8000 [MRG+1] TST Stronger test for _check_is_permutation by raghavrv · Pull Request #7395 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG+1] TST Stronger test for _check_is_permutation #7395

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 2 commits into from
Sep 12, 2016

Conversation

raghavrv
Copy link
Member

Addresses one of the issues of #5053

@vene I think this should address your comment.

@raghavrv
Copy link
Member Author

@jnothman Revews for this one? The previous version will pass for

_check_is_permutation = lambda indices, n: indices == np.arange(n)

@jnothman
Copy link
Member

Sorry, I don't get what you're saying about the previous version.

@jnothman
Copy link
Member

Oh. I get what you're saying. You need a np.all.

@jnothman
Copy link
Member

I think the obvious case the test is missing is indices = np.hstack([np.arange(n_samples), 0])

@raghavrv
Copy link
Member Author

@jnothman Good now?

@jnothman
Copy link
Member

LGTM

@jnothman jnothman changed the title [MRG] TST Stronger test for _check_is_permutation [MRG+1] TST Stronger test for _check_is_permutation Sep 12, 2016
@amueller amueller merged commit b18b161 into scikit-learn:master Sep 12, 2016
@raghavrv raghavrv deleted the model_selection_enhancements2 branch September 12, 2016 15:51
rsmith54 pushed a commit to rsmith54/scikit-learn that referenced this pull request Sep 14, 2016
* TST Stronger test for _check_is_permutation

* TST Ensure additional duplicate indices are caught
TomDLT pushed a commit to TomDLT/scikit-learn that referenced this pull request Oct 3, 2016
* TST Stronger test for _check_is_permutation

* TST Ensure additional duplicate indices are caught
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
* TST Stronger test for _check_is_permutation

* TST Ensure additional duplicate indices are caught
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
* TST Stronger test for _check_is_permutation

* TST Ensure additional duplicate indices are caught
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
0