Support sparse matrix with bool
- Dominant language
- Python
- Stars
- 12.3k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 45
Description
Currently, `cupyx.scipy.sparse.*_matrix` classes have partial support for `bool` dtype. Specifically:
* COO matrix does not support `bool` https://github.com/cupy/cupy/blob/eb4a7b4ca9b1caf139abac00845028e6419d51dc/cupyx/scipy/sparse/_coo.py#L141-L144
* Other matrix classes accepts creation of `bool` matrix, but are not well-tested.
```[tasklist]
- [x] Support `bool` matrix in COO #7764
- [ ] Add tests for `bool` dtype for each matrix format
- [ ] Add boolean operators (e.g., `__ne__`) for each matrix format to avoid intermediate conversion to CSR (#7757)
- [ ] Add boolean methods (e.g., `nonzero`) for each matrix format (#7751)
```
Contributor guide
Research direction
Start by reviewing cupyx/scipy/sparse/_coo.py around the referenced bool-dtype handling, then compare the other sparse matrix format classes and their existing tests. Add bool-dtype coverage for each format and address the remaining boolean operators and methods listed in the task list; done means the listed formats are tested and support the requested operations without the noted intermediate conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100