Skip to content

[MRG] FIX Use float64 instead of float.#5356

Merged
ogrisel merged 1 commit intoscikit-learn:masterfrom
raghavrv:ridge_appveyor_failure
Oct 8, 2015
Merged

[MRG] FIX Use float64 instead of float.#5356
ogrisel merged 1 commit intoscikit-learn:masterfrom
raghavrv:ridge_appveyor_failure

Conversation

@raghavrv
Copy link
Copy Markdown
Member

@raghavrv raghavrv commented Oct 7, 2015

Attempting to fix #4914 (#5235)

Note: This fix is useful but does not fix #4914

Thanks to @giorgiop!!

@raghavrv raghavrv changed the title FIX Use float64 instead of float. [MRG] FIX Use float64 instead of float. Oct 7, 2015
@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Oct 7, 2015

LGTM. Let's wait for appveyor to complete.

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Oct 7, 2015

@raghavrv raghavrv force-pushed the ridge_appveyor_failure branch from 085f2c9 to 86be478 Compare October 7, 2015 15:11
@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Oct 8, 2015

So this is not fixing the original issue but it's a good practice to fix the precision level we expect from the input data and not rely on possibly platform specific defaults. Merging.

ogrisel added a commit that referenced this pull request Oct 8, 2015
[MRG] FIX Use float64 instead of float.
@ogrisel ogrisel merged commit ba3caf4 into scikit-learn:master Oct 8, 2015
@giorgiop
Copy link
Copy Markdown
Contributor

giorgiop commented Oct 8, 2015

If one would like to fix those over all sklearn, it's easy to find them.

git grep dtype=np.float,
sklearn/cluster/hierarchical.py:    inertia = np.empty(len(coord_row), dtype=np.float, order='C')
sklearn/cluster/hierarchical.py:        ini = np.empty(n_additions, dtype=np.float, order='C')
sklearn/linear_model/ridge.py:        X, y = check_X_y(X, y, ['csr', 'csc', 'coo'], dtype=np.float,
sklearn/preprocessing/data.py:                 dtype=np.float, sparse=True, handle_unknown='error'):

@raghavrv raghavrv deleted the ridge_appveyor_failure branch October 8, 2015 21:09
@raghavrv
Copy link
Copy Markdown
Member Author

raghavrv commented Oct 9, 2015

git grep "dtype=np.float[^36]" rather! And here's a PR for that - #5375

@giorgiop
Copy link
Copy Markdown
Contributor

giorgiop commented Oct 9, 2015

They are many more than I thought :)

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.

Random failure on sklearn.linear_model.tests.test_ridge:test_class_weight_vs_sample_weight under Windows

3 participants