8000 [MRG] Replace all the deprecated random_integers by randint. by tguillemot · Pull Request #6712 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] Replace all the deprecated random_integers by randint. #6712

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 1 commit into from
Apr 26, 2016

Conversation

tguillemot
Copy link
Contributor

The function random_integers was recently deprecated in numpy resulting a lot of warnings during the test. This PR is done to correct that.

@@ -627,7 +627,7 @@ def lasso_stability_path(X, y, scaling=0.5, random_state=None,
paths = Parallel(n_jobs=n_jobs, verbose=verbose)(
delayed(_lasso_stability_path)(
X, y, mask=rng.rand(n_samples) < sample_fraction,
weights=1. - scaling * rng.random_integers(0, 1,
weights=1. - scaling * rng.randint(0, 1,
size=(n_features,)),
Copy link
Member

Choose a reason for hiding this comment

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

Indentation

@jnothman
Copy link
Member

Please check indentation, and where possible avoid line wrapping.

@tguillemot
Copy link
Contributor Author

Sorry for that, it's corrected now.

@tguillemot tguillemot changed the title Replace all the deprecated random_integers by randint. [MRG] Replace all the deprecated random_integers by randint. Apr 25, 2016
@ogrisel
Copy link
Member
ogrisel commented Apr 25, 2016

LGTM, +1 once CI is all-green.

@@ -23,7 +23,11 @@ def compute_bench(samples_range, features_range):
print('Iteration %03d of %03d' % (it, max_it))
print('==============================')
print()
data = nr.random_integers(-50, 50, (n_samples, n_features))
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

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

There are some merge conflicts you missed...

Copy link
Member

Choose a reason for hiding this comment

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

ooops

@raghavrv
Copy link
Member

+1 from me too!

@TomDLT
Copy link
Member
TomDLT commented Apr 25, 2016

+1 after cleaning the conflict

@tguillemot
Copy link
Contributor Author

Sorry for the forgotten HEAD.

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.

5 participants
0