Skip to content

TST Manually scramble the indices in svm tests #12890

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 2, 2019
Merged

TST Manually scramble the indices in svm tests #12890

merged 3 commits into from
Jan 2, 2019

Conversation

qinhanmin2014
Copy link
Member

@qinhanmin2014 qinhanmin2014 commented Dec 30, 2018

Closes #12882
Travis cron job failure due to changes in scipy

import numpy as np
import scipy.sparse as sp
X = sp.csr_matrix(np.ones((3, 3)))
print(X.indices)
# [0 1 2 0 1 2 0 1 2]
Xt = X[np.arange(3)]
print(Xt.indices)
# scipy 1.2.0 [2 1 0 2 1 0 2 1 0]
# scipy master [0 1 2 0 1 2 0 1 2]

Copy link
Contributor

@perimosocordiae perimosocordiae left a comment

Choose a reason for hiding this comment

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

Looks good overall. The old behavior only changed the sort order accidentally, but this should work for all scipy versions.

@qinhanmin2014
Copy link
Member Author

thanks @perimosocordiae for the review :)

@adrinjalali adrinjalali merged commit a1c199f into scikit-learn:master Jan 2, 2019
@qinhanmin2014 qinhanmin2014 deleted the cron-failure branch January 3, 2019 01:11
adrinjalali pushed a commit to adrinjalali/scikit-learn that referenced this pull request Jan 7, 2019
* [scipy-dev] manually scramble the indices

* [scipy-dev] review comment
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
* [scipy-dev] manually scramble the indices

* [scipy-dev] review comment
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
* [scipy-dev] manually scramble the indices

* [scipy-dev] review comment
jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request Jul 23, 2019
* [scipy-dev] manually scramble the indices

* [scipy-dev] review comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants