From 0f1506633d69dfb9829fbe6bec2636b51b8f1d5c Mon Sep 17 00:00:00 2001 From: Lars Buitinck <L.J.Buitinck@uva.nl> Date: Fri, 11 Nov 2011 23:38:23 +0100 Subject: [PATCH] COSMIT no need for csr_matrix "cast" in coord descent --- sklearn/linear_model/sparse/coordinate_descent.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/sklearn/linear_model/sparse/coordinate_descent.py b/sklearn/linear_model/sparse/coordinate_descent.py index 634b903654..c33ee3d6cc 100644 --- a/sklearn/linear_model/sparse/coordinate_descent.py +++ b/sklearn/linear_model/sparse/coordinate_descent.py @@ -116,8 +116,6 @@ class ElasticNet(LinearModel): ------- array, shape = [n_samples] with the predicted real values """ - if not sp.issparse(X): - X = sp.csr_matrix(X) return np.ravel(safe_sparse_dot(self.sparse_coef_, X.T, dense_output=True) + self.intercept_) -- GitLab