Proposal
Add sparse (pydata/sparse) as a test backend — initially as a diagnostic for densification escapes, potentially graduating to a supported library (already listed as a welcome contribution in docs/array_api.rst).
Why: sparse raises RuntimeError on implicit densification by default (unless SPARSE_AUTO_DENSIFY=1), so it catches np.asarray-style escapes on the CPU — the same class of bug CuPy reports as Implicit conversion to a NumPy array is not allowed, without needing a GPU.
Caveats
- sparse's array-API coverage is narrower than CuPy's (no general in-place mutation, gaps in reductions/sorting), so some failures will be false positives for the CuPy question. Treat a sparse pass as strong evidence and a sparse failure as needing triage — a diagnostic filter, not a CI gate, at first.
- Keep the test images dense-valued so only protocol behavior differs, not numerics.
Work items
Follow-up to #909. Found during a review of the array API implementation from #885.
Proposal
Add
sparse(pydata/sparse) as a test backend — initially as a diagnostic for densification escapes, potentially graduating to a supported library (already listed as a welcome contribution indocs/array_api.rst).Why:
sparseraisesRuntimeErroron implicit densification by default (unlessSPARSE_AUTO_DENSIFY=1), so it catchesnp.asarray-style escapes on the CPU — the same class of bug CuPy reports asImplicit conversion to a NumPy array is not allowed, without needing a GPU.Caveats
Work items
sparseinto theCCDPROC_ARRAY_LIBRARYmechanism.Follow-up to #909. Found during a review of the array API implementation from #885.