Programatically get return type of `broadcast`?

Using this you get the dimension of the resulting array:

julia> StaticArrays.combine_sizes(StaticArrays.broadcast_sizes(a1,a2))
Size(3, 4)

which corresponds to this operation on the broadcast:

julia> StaticArrays.broadcast_size(a1 .+ a2)
Size(3, 4)

1 Like