pydata/sparse

Add advanced indexing support

Open

#114 opened on Mar 1, 2018

 (12 comments) (0 reactions) (0 assignees)Python (138 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (666 stars)
PR merge metrics
 (PR metrics pending)

Description

I would like to have support for advanced indexing for both retrieval and assignment. Ideally I was hoping to find something that could serve as a drop-in replacement for numpy.ndarray for these types of operations. Is this functionality something that would be in the scope of this library? Are there any thoughts on how it should be implemented?

On a related note I noticed that COO is currently immutable and thus doesn't doesn't allow item assignment. However I wonder if one could support assignment by having COO make an in-place copy of itself. Of course this will be extremely inefficient for updating a single element but when addressing a large number of elements in parallel the overhead from the copy should be more manageable. Of course in the documentation you could stress that setting elements of COO individually is not recommended.

Contributor guide