How to hcat a vector of vectors to produce a matrix with a specified eltype?

This should work, and is both intuitive and efficient:

using SplitApplyCombine

# get a materialized array without intermediate allocations:
map(Float64, combinedimsview(A))

# get a view of the original array - basically free, you pay when accessing it:
mapview(Float64, combinedimsview(A))
1 Like