pub fn normalize(weights: &Array1<C64>) -> Result<Array1<C64>, ErrorsJSL>
w / ‖w‖, with the phase fixed so the largest-magnitude weight is real and positive (making eigenvector solutions reproducible).
w / ‖w‖