Open ParadaCarleton opened 3 years ago
This is also fixed in Base, where 1.6 had
julia> rand(3) .= ones(1,3)'
ERROR: DimensionMismatch("cannot broadcast array to have fewer dimensions")
now 1.7 has this:
julia> rand(3) .= ones(1,3)'
3-element Vector{Float64}:
1.0
1.0
1.0
julia> wrapdims(rand(3)) .= wrapdims(ones(1,3))'
ERROR: DimensionMismatch("destination axes (Base.OneTo(3),) are not compatible with source axes (Base.OneTo(3), Base.OneTo(1))")
I think your example would also hit the second error here, on 1.7. This one should certainly be fixed here.
Trying to write into an array gives an error when one of the arrays has a trailing singleton dimension:
Where
table(:, :total)
andsum(pointwise([:loo_score, :naive_score, :overfit]); dims=1)'
return:This can be left (which would be consistent with Base), or trailing singleton dimensions could be fixed for ease-of-use.