Closed mtsokol closed 5 months ago
does "canonical" mean "sorted"? just curious. thanks!
does "canonical" mean "sorted"? just curious. thanks!
Yes! finch-tensor
requires it. I realized that creating SparseCOO
with coords arrays that aren't sorted results in a broken Tensor (e.g. when densifying (copying to a dense Tensor) the resulting tensor is incorrect).
does "canonical" mean "sorted"? just curious. thanks!
Almost, sorted + no duplicate entries. 😄
Hi @hameerabbasi,
When consuming SciPy sparse object, Finch expects it to be in a canonical format. When it's not true then array isn't loaded properly.
Here I verify that input is in canonical format and raise a proper warning.