-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
The issue is that, because of more aggressive type promotion for arrays on nightly,
ulia> [ones(2), ones(2:3)]
ERROR: DimensionMismatch: axes must agree, got (Base.OneTo(2),) and (OffsetArrays.IdOffsetRange(values=2:3, indices=2:3),)
Stacktrace:
[1] (::Base.var"#checkaxs#139")(axd::Tuple{Base.OneTo{Int64}}, axs::Tuple{OffsetArrays.IdOffsetRange{Int64, Base.OneTo{Int64}}})
@ Base ./abstractarray.jl:1123
[2] copyto_axcheck!(dest::Vector{Float64}, src::OffsetVector{Float64, Vector{Float64}})
@ Base ./abstractarray.jl:1125
[3] Array
@ ./array.jl:625 [inlined]
[4] convert
@ ./array.jl:616 [inlined]
[5] setindex!
@ ./array.jl:961 [inlined]
[6] copyto!(dest::Vector{Vector{Float64}}, src::Tuple{Vector{Float64}, OffsetVector{Float64, Vector{Float64}}})
@ Base ./abstractarray.jl:909
[7] vect(::Vector{Float64}, ::Vararg{Any})
@ Base ./array.jl:147
[8] top-level scope
@ REPL[4]:1whereas, on 1.7 and 1.8.0-beta3,
julia> [ones(2), ones(2:3)]
2-element Vector{AbstractVector{Float64}}:
[1.0, 1.0]
[1.0, 1.0]It was suggested that the fix should go here, by defining appropriate promotion rules.
Metadata
Metadata
Assignees
Labels
No labels