You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using BlockArrays: mortar
julia> a =rand(4)
4-element Vector{Float64}:0.82458820570366660.64963276995063890.20584230914084910.22035347885553225
julia> b =mortar([rand(2), rand(2)])
2-blocked 4-element BlockVector{Float64}:0.217981639540852920.5995732233841912
───────────────────
0.78307011870339790.662908943211767
julia> a + b
2-blocked 4-element BlockVector{Float64, Vector{Vector{Float64}}, Tuple{BlockedUnitRange{Int64, Vector{Int64}}}}:1.04256984524451961.24920599333483
──────────────────
0.9889124278442470.8832624220672992
The result of a + b should have the same axis type as b. I noticed this because I had a vector c = [b] and couldn't push a + b into c because the types don't match.
The text was updated successfully, but these errors were encountered:
lassepe
changed the title
Adding BlockVector with regular vector causes axes to be promoted from BlockedOneTo to BlockedUnitRange+(::BlockVector, ::Vector) promotes axis from BlockedOneTo to BlockedUnitRangeJun 16, 2024
As the title says:
The result of
a + b
should have the same axis type asb
. I noticed this because I had a vectorc = [b]
and couldn't pusha + b
intoc
because the types don't match.The text was updated successfully, but these errors were encountered: