File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
sklearn/feature_selection Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ Changelog
140
140
`'auto' ` in 1.3. `None ` and `'warn' ` will be removed in 1.3. :pr: `20145 ` by
141
141
:user: `murata-yu `.
142
142
143
+ :mod: `sklearn.feature_selection `
144
+ ................................
145
+
146
+ - |Efficiency | Improve runtime performance of :func: `feature_selection.chi2 `
147
+ with boolean arrays. :pr: `xxxxx ` by `Thomas Fan `_.
148
+
143
149
:mod: `sklearn.datasets `
144
150
.......................
145
151
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ def chi2(X, y):
210
210
211
211
# XXX: we might want to do some of the following in logspace instead for
212
212
# numerical stability.
213
- X = check_array (X , accept_sparse = "csr" )
213
+ X = check_array (X , accept_sparse = "csr" , dtype = np . float64 )
214
214
if np .any ((X .data if issparse (X ) else X ) < 0 ):
215
215
raise ValueError ("Input X must be non-negative." )
216
216
You can’t perform that action at this time.
0 commit comments