I noticed that numpy.linalg.eigvalsh returns a complex array, even
though mathematically the resulting eigenvalues are guaranteed to be
real.

Looking at the source code, the underlying zheevd routine of LAPACK
indeed returns an array of real numbers which is than converted to
complex in the numpy wrapper.

Does numpy policy require the type of the result to be the same as the
type of input?  Copying an array twice to arrive at the original result
seems pointless to me.

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to