| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
host() sizes its buffer from elements(), which reports the dense shape for a sparse array, but af_get_data_ptr then rejected the array with "Expected: info->isSparse() == false". Convert to dense first and copy that, and say so in the docs. Fixes #3703.
CSC to dense is not implemented, so host() on a CSC array now fails with AF_ERR_NOT_SUPPORTED and a message instead of an argument error from deep inside the conversion. The docs say CSR and COO. The test gains an fp64 guard and a case that compares host() against the dense source for CSR and COO and expects the CSC rejection.
| Back | FazBrowse Home | New Git URL |
Calling host() on a sparse array threw:
host() sizes its buffer from elements(), which already reports the dense shape for a sparse array, so af_get_data_ptr now converts CSR and COO arrays to dense and copies that. CSC to dense is not implemented anywhere, so a CSC array fails with AF_ERR_NOT_SUPPORTED and a message saying to convert to CSR or COO first; the C++ and C docs say the same. Callers who relied on the old error to detect sparse arrays now get data instead, which is worth a line in the release notes. Tests cover the reported case and compare host() against the dense source for CSR and COO; the sparse suite passes on the CPU backend (88 tests). Fixes #3703.