I don’t know if it’s the best idea (I’m not well versed in linear algebra and scientific computing), but I’m thinking of using nalgebra to compute roots, in a similar way to Numpy
I’m wondering what the best way is to construct the companion matrix https://en.m.wikipedia.org/wiki/Companion_matrix
I see that there’s ways to create a diagonal matrix, but the companion matrix needs it to be offset. I guess I can manually do the offset and use something like
from_vec, but wanted to check if there was an easier way.