JuliaLang/julia

Ellipsis slicing

开放

#5,405 创建于 2014年1月15日

 (29 条评论) (8 个反应) (0 位负责人)Julia (5,773 个派生)batch import
arrayshelp wantedparser

仓库指标

星标
 (48,709 个星标)
PR 合并指标
 (平均合并 20天 6小时) (30 天内合并 157 个 PR)

描述

Numpy has this ellipsis notation for filling index tuples up to dimension, where in A[..., i, k] ... is interpreted as shorthand for the number of colons :, :, : etc needed to fill the indexing tuple up to dimension n.

http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html

This gives nice access to contiguous subarrays in the dense array case and would be not more harmful than the : notation itself.

Was this feature already considered? It was mentioned by @toivoh on the mailing list, but did not trigger discussion.

贡献者指南