In Julia 1.9, this is possible with stack ![]()
julia> f(x,y) = rand(2,3)
f (generic function with 1 method)
julia> stack([f(x,y) for x in 1:4, y in 1:5]) |> size
(2, 3, 4, 5)
In Julia 1.9, this is possible with stack ![]()
julia> f(x,y) = rand(2,3)
f (generic function with 1 method)
julia> stack([f(x,y) for x in 1:4, y in 1:5]) |> size
(2, 3, 4, 5)