pymc-devs / pymc-devs/pytensor
Should PyTensor extend its Numba overloads to support all `scipy.sparse.cs[r|c]_matrix` initialization modes?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 644
- Forks
- 208
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 16
Description
Description
PyTensor’s Numba overloads for scipy.sparse.cs[r|c]_matrix currently support only a subset of the initialization behaviors provided by the corresponding SciPy constructors.
For example, calling
scipy.sparse.csr_matrix(a_csr_matrix)
scipy.sparse.csc_matrix(a_csc_matrix)
always creates a copy in our Numba overloads, while SciPy allows users to control this behavior via the copy parameter.
I’m opening this issue to:
- Avoid losing track of the discussion started in https://github.com/pymc-devs/pytensor/pull/1860/changes#r2751489368
- Open a broader discussion about whether PyTensor’s Numba overloads for SciPy sparse matrix constructors should support more (or all) of the input combinations and behaviors already supported by SciPy.
- If we decide to expand support, should this work be done here or in numba-sparse?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Numba overloads for scipy.sparse.csr_matrix and scipy.sparse.csc_matrix, then review the discussion in pull request 1860. Compare the supported initialization modes with the SciPy constructors and clarify whether broader support belongs in PyTensor or numba-sparse. Done means the scope and ownership of the expansion are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100