External product of StaticArrays vectors

Hi!

Do you mean outer product? If so, you can just do

julia> a = @SVector randn(4);

julia> b = @SVector randn(4);

julia> a*b'
4×4 SArray{Tuple{4,4},Float64,2,16} with indices SOneTo(4)×SOneTo(4):
  0.423303   0.402792   0.373048   0.136053
 -0.782696  -0.744771  -0.689774  -0.251565
  0.774667   0.73713    0.682698   0.248984
 -0.982405  -0.934802  -0.865773  -0.315753
1 Like