First time here? Check out the FAQ!
answered 2023-12-10 23:32:55 +0200
Is this the only way to do it or there is some built-in function?
QuadraticForm(gm + gm.transpose()).coefficients()
[4, -12, 8, -4, 12, -16, 8, 6, -6, 2]