You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ensure all CSR / CSC matrices that we hack are valid #7762
See scipy/scipy#6719 and #7750.
I think we should start with a git grep for .indices but maybe also add something to the common tests to check the validity of the outputs.
OK, that should be it, the other lines from the grep above either reference indices from CV Folds, are made from the existing sparse matrix's indices, or set both indices and indptr together (which is OK).
If I understand correctly, the only failure reported in this comment has been fixed by #11295. I'm closing this one. Feel free to reopen or open a new one with updated context if I'm wrong.
Activity
gvacaliuc commentedon Jun 15, 2018
I'm working on this one.
gvacaliuc commentedon Jun 15, 2018
This is the grep command and output I'm using to locate usages of potential error:
EDIT: I realized the issue is only for manual hacking of
.indicesand.indptr.Explanation: Searches for lines that directly set
indicesorindptr, but excludes boolean operators which contain=(<=,>=,==).gvacaliuc commentedon Jun 15, 2018
After looking line by line, these are the ones that could potentially cause issues and need to be addressed:
sklearn/feature_extraction/text.py: X.indices = map_index.take(X.indices, mode='clip')CountVectorizers sparse feature matrix requires 64-bit indices, asnp.int32is hard coded for themap_index.amueller commentedon Jun 15, 2018
wow that's some good detective work right there!
fixes an issue discussed in scikit-learn#7762
gvacaliuc commentedon Jun 15, 2018
OK, that should be it, the other lines from the grep above either reference indices from CV Folds, are made from the existing sparse matrix's indices, or set both
indicesandindptrtogether (which is OK).fixes an issue discussed in scikit-learn#7762
fixes an issue discussed in scikit-learn#7762
cmarmo commentedon Apr 1, 2021
If I understand correctly, the only failure reported in this comment has been fixed by #11295. I'm closing this one. Feel free to reopen or open a new one with updated context if I'm wrong.