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.

贡献者指南