Skip to content

Store linearized indices instead of full coordinates #164

Open
@hameerabbasi

Description

@hameerabbasi

I was thinking of replacing the full coordinates (coords) with just a 1-D array of linearised indices.

Pros:

  • More memory efficient (this gives back a lot of benefits of A range of fixes relating to small coords dtypes #158)
  • Some O(N) operations become O(1) such as reshape, flatnonzero.
  • COO becomes a special case of the GCRS/GCCS scheme, which means we can drop CSD and go with GCRS/GCCS, but with the difference that any collection of axes (not just rows/columns) can be compressed.
  • CSR/CSC are represented exactly as in SciPy/other libraries (instead of having 2-D indices)

Cons:

  • Adds a small (my intuition says almost negligible) performance penalty in many operations.
  • Some O(1) operations become O(N) such as nonzero, the one-argument version of where.

cc @mrocklin, @stefanv

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions