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?