Skip to content

Commit d85e222

Browse files
authored
MAINT make sure that hstack outputs a CSR matrix (scikit-learn#26555)
1 parent b044ef8 commit d85e222

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/preprocessing/_polynomial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ def transform(self, X):
11451145
" of scipy `>=1.9.2` or alter the `SplineTransformer`"
11461146
" transformer to produce fewer than 2^31 output features"
11471147
)
1148-
XBS = sparse.hstack(output_list)
1148+
XBS = sparse.hstack(output_list, format="csr")
11491149
elif self.sparse_output:
11501150
# TODO: Remove ones scipy 1.10 is the minimum version. See comments above.
11511151
XBS = sparse.csr_matrix(XBS)

0 commit comments

Comments
 (0)