We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base.vect
This works on 1.7 and 1.8-beta3:
julia> using OffsetArrays julia> ri = 2:3; julia> [Base.IdentityUnitRange(ri), OffsetArray(ri, 2)] 2-element Vector{AbstractVector{Int64}}: Base.IdentityUnitRange(2:3) 2:3 with indices 3:4
but on Version 1.9.0-DEV.353 (2022-04-09):
Version 1.9.0-DEV.353 (2022-04-09)
julia> using OffsetArrays julia> ri = 2:3; julia> [Base.IdentityUnitRange(ri), OffsetArray(ri, 2)] ERROR: DimensionMismatch: axes must agree, got (Base.OneTo(2),) and (OffsetArrays.IdOffsetRange(values=3:4, indices=3:4),) Stacktrace: [1] (::Base.var"#checkaxs#141")(axd::Tuple{Base.OneTo{Int64}}, axs::Tuple{OffsetArrays.IdOffsetRange{Int64, Base.OneTo{Int64}}}) @ Base ./abstractarray.jl:1123 [2] copyto_axcheck! @ ./abstractarray.jl:1125 [inlined] [3] Array @ ./array.jl:626 [inlined] [4] convert @ ./array.jl:617 [inlined] [5] setindex!(A::Vector{Vector{Int64}}, x::OffsetVector{Int64, UnitRange{Int64}}, i1::Int64) @ Base ./array.jl:966 [6] copyto!(dest::Vector{Vector{Int64}}, src::Tuple{Base.IdentityUnitRange{UnitRange{Int64}}, OffsetVector{Int64, UnitRange{Int64}}}) @ Base ./abstractarray.jl:909 [7] vect(::Base.IdentityUnitRange{UnitRange{Int64}}, ::Vararg{Any}) @ Base ./array.jl:147 [8] top-level scope @ REPL[3]:1
The destination is chosen as Vector{Vector{Int64}}, which doesn't have offset axes.
Vector{Vector{Int64}}
The text was updated successfully, but these errors were encountered:
Sounds like a possibly OffsetArrays bug (it needs to define a promotion rule that supersedes that for AbstractArray)
Sorry, something went wrong.
AbstractArray
vect
1.8
1.9
nightly
Successfully merging a pull request may close this issue.
This works on 1.7 and 1.8-beta3:
but on
Version 1.9.0-DEV.353 (2022-04-09)
:The destination is chosen as
Vector{Vector{Int64}}
, which doesn't have offset axes.The text was updated successfully, but these errors were encountered: