-
-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
using RecursiveArrayTools
a = ArrayPartition(1:5, 1:6)
a[1:8]
a[[1,3,8]]
both throw
ERROR: DimensionMismatch("output array is the wrong size; expected (Base.OneTo(8),), got (11,)")
Stacktrace:
[1] throw_checksize_error(::ArrayPartition{Int64,Tuple{Array{Int64,1},Array{Int64,1}}}, ::Tuple{Base.OneTo{Int64}}) at ./multidimensional.jl:625
[2] _unsafe_getindex(::IndexCartesian, ::ArrayPartition{Int64,Tuple{UnitRange{Int64},UnitRange{Int64}}}, ::UnitRange{Int64}) at ./multidimensional.jl:602
[3] _getindex at ./multidimensional.jl:589 [inlined]
[4] getindex(::ArrayPartition{Int64,Tuple{UnitRange{Int64},UnitRange{Int64}}}, ::UnitRange{Int64}) at ./abstractarray.jl:905
Single-indexing a[3]
works just fine, obviously.
Metadata
Metadata
Assignees
Labels
No labels