Use the stack function.
stack([[1,0,1],[0,0,1]], dims=1) == [ 1 0 1 ; 0 0 1 ]trueIf you only need broadcast operations, RecursiveArrayTools
using RecursiveArrayTools
a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
b = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
vA = VectorOfArray(a)
vB = VectorOfArray(b)
vA .* vBVectorOfArray{Int64,2}:
3-element Vector{Vector{Int64}}:
[1, 4, 9]
[16, 25, 36]
[49, 64, 81]Convert a VectorOfArray into a matrix.
Matrix(vA .* vB)3×3 Matrix{Int64}:
1 16 49
4 25 64
9 36 81This notebook was generated using Literate.jl.