If I have a length 6 vector, is there a way I can `reshape` that into a 3x3 symmet

If I have a length 6 vector, is there a way I can reshape that into a 3x3 symmetric matrix cleanly/efficiently? Currently I just hardcode the element places.

Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread.
(Original message :slack:) (More Info)

1 Like

julia> SHermitianCompact(SA[1,2,3,4,5,6]) 3×3 SHermitianCompact{3, Int64, 6} with indices SOneTo(3)×SOneTo(3): 1 2 3 2 4 5 3 5 6

1 Like