Skip to content
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

FIX: dtype check in MultiTaskLassoCV and MultiTaskLassoCV #15086

Merged

Conversation

agramfort
Copy link
Member

@agramfort agramfort commented Sep 24, 2019

closes #15081

@agramfort agramfort force-pushed the fix_dtype_int_MultiTaskLassoCV branch from 82d3157 to 69fead3 Compare Sep 24, 2019
rth
rth approved these changes Sep 25, 2019
Copy link
Member

@rth rth left a comment

Minor comment, LGTM otherwise.

def test_multi_task_lasso_cv_dtype():
n_samples, n_features = 10, 3
rng = np.random.RandomState(42)
X = rng.binomial(1, .5, size=(n_samples, n_features))
Copy link
Member

@rth rth Sep 25, 2019

Choose a reason for hiding this comment

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

It's not necessarily clear to me while reading this that it would return a dtype int. Maybe worth, explicitly casting to int for readability,

Suggested change
X = rng.binomial(1, .5, size=(n_samples, n_features))
X = rng.binomial(1, .5, size=(n_samples, n_features)).astype(np.int)

Copy link
Member Author

@agramfort agramfort Sep 25, 2019

Choose a reason for hiding this comment

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

done below.

Copy link
Member

@GaelVaroquaux GaelVaroquaux left a comment

LGTM.

@GaelVaroquaux
Copy link
Member

@GaelVaroquaux GaelVaroquaux commented Sep 26, 2019

Merging.

@GaelVaroquaux GaelVaroquaux merged commit d92f12a into scikit-learn:master Sep 26, 2019
19 checks passed
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