Skip to content

Conversation

@mbauman
Copy link
Member

@mbauman mbauman commented Jul 24, 2015

Back in #10525, I decided to deprecate setindex!(A, x, I::Union{Real, Int, AbstractArray}...) for symmetry since getindex only allows vector indices when there's more than one index.

But looking forward, I would really like to work towards APL semantics in 0.5 wherein the sum of the dimensionality of the indices is the dimensionality of the output array. For example, indexing A[[1 2; 3 4], 1] would output a 2-dimensional 2x2 array: [A[1,1] A[2, 1]; A[3,1] A[4,1]]. In which case, we'd add support back in for setindex! with array indices for symmetry. This seems like needless churn - let's just leave things be until 0.5.

Back in #10525, I decided to deprecate `setindex!(A, x, I::Union{Real, Int, AbstractArray}...)` for symmetry since `getindex` only allows vector indices when there's more than one index.

But looking forward, I would really like to work towards APL semantics in 0.5 wherein the sum of the dimensionality of the indices is the dimensionality of the output array.  For example, indexing `A[[1 2; 3 4], 1]` would output a 2-dimensional `2x2` array: `[A[1,1] A[2, 1]; A[3,1] A[4,1]]`.  In which case, we'd add support back in for `setindex!` with array indices for symmetry.  This seems like needless churn - let's just leave things be until 0.5.
JeffBezanson added a commit that referenced this pull request Jul 27, 2015
Un-deprecate setindex with multidimensional indices
@JeffBezanson JeffBezanson merged commit 2b3604f into master Jul 27, 2015
@mbauman mbauman deleted the mb/undeprecatedapl branch July 27, 2015 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants