Closed
Description
There are some aspects of getindex
.
Let A
is a n
-dimensional array, say 4-dimensional with size(A) == (2,3,2,2)
,
- Dimensions left out get flattened into the last indexed dimension, so for example
A[i, k]==A[i,:,:,:][k] for k in 1:12
This seems to be a consistent generalization of A[:] transforming the array to a vector. - Also additional indexes of the form
1
,:
and equivalent1:1
(additional to then
dimensions) can be provided. For example
A[2,3,2,2, 1, 1] ~ Int64 A[2,3,2,2, :, 1] ~ 1x1x1x1x1 Array{Int64,5}
(In both cases as usual the trailing integer-indexed dimension are removed)
Which behaviors are desired, which are artifacts from the implementation, which should be documented?
Activity