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
functionblocks_to_vector(blocks)
R =eltype(blocks)
T =eltype(R)
@assert R <:AbstractVector
ba =BlockArray{T, 1, R}(undef_blocks, size.(blocks, 1))
ba.blocks .= blocks
return ba
endusing FillArrays
x =blocks_to_vector([Fill(111.0, 4), Fill(222.0, 3)])
to create a BlockVector from a vector of blocks.
I first thought this was awkward and I was missing an API to do this but after finding #30 (comment) I started to think that there was no API to do this. Is it correct? If so, does it make sense to add an API for this?
In #61 (comment) I wrote
to create a BlockVector from a vector of blocks.
I first thought this was awkward and I was missing an API to do this but after finding #30 (comment) I started to think that there was no API to do this. Is it correct? If so, does it make sense to add an API for this?
(Note: #40 looks somewhat relevant)
The text was updated successfully, but these errors were encountered: