pydata/sparse

Add advanced indexing support

開放

#114 建立於 2018年3月1日

 (12 則留言) (0 個反應) (0 位負責人)Python (138 個分叉)auto 404
enhancementhelp wanted

倉庫指標

星標
 (666 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南