Skip to content

Commit

Permalink
MAINT make sure that hstack outputs a CSR matrix (scikit-learn#26555)
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Jun 9, 2023
1 parent b044ef8 commit d85e222
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/preprocessing/_polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def transform(self, X):
" of scipy `>=1.9.2` or alter the `SplineTransformer`"
" transformer to produce fewer than 2^31 output features"
)
XBS = sparse.hstack(output_list)
XBS = sparse.hstack(output_list, format="csr")
elif self.sparse_output:
# TODO: Remove ones scipy 1.10 is the minimum version. See comments above.
XBS = sparse.csr_matrix(XBS)
Expand Down

0 comments on commit d85e222

Please sign in to comment.