JuliaLang/julia

Ellipsis slicing

Open

#5 405 ouverte le 15 janv. 2014

Voir sur GitHub
 (29 commentaires) (8 réactions) (0 assignés)Julia (5 773 forks)batch import
arrayshelp wantedparser

Métriques du dépôt

Stars
 (48 709 stars)
Métriques de merge PR
 (Merge moyen 20j 6h) (157 PRs mergées en 30 j)

Description

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.

Guide contributeur