[SciPy-Dev] Allow non-canonical form in COO?

Hameer Abbasi einstein.edison at gmail.com
Mon Apr 23 12:02:08 EDT 2018


 Hello SciPy-Dev,

I submitted a pull request <https://github.com/pydata/sparse/pull/141> to
pydata/sparse <https://github.com/pydata/sparse> (I’m one of its
maintainers) about always keeping a COO array in canonical form.

We (Matthew Rocklin, CJ Carey and I) were having a discussion there about
whether it makes sense to allow sparse COO arrays to be in non-canonical
order. In short, canonical form is:

   - Coordinates are sorted in lexographical order, i.e., the same order
   they would appear in in a C-contiguous array.
   - There are no duplicate coordinates allowed.
   - There are no stored coordinates with a zero value.

With this in mind, what are the SciPy developers’ opinions on this? Does
allowing COO arrays to be in non-canonical form make sense? Feedback
welcome on the PR or the mailing list.

Best regards,
Hameer Abbasi
Sent from Astro <https://www.helloastro.com> for Mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180423/673c2c4f/attachment.html>


More information about the SciPy-Dev mailing list