Re: Changing the return type of linalg.eig and linalg.eigvals

"Juan Nunez-Iglesias" <[email protected]> Thu, 19 Feb 2026 11:19:51 +1100
Newsgroups gmane.comp.python.numeric.general
Message-ID <[email protected]>
>    ```
>    w = eigvals(a)
>    if w.imag == 0:    # this is what NumPy used to do
>    w = w.real
>    ```

if np.all(w.imag == 0):

surely? I think given the minor adjustment, it's worth including actual code rather than pseudocode in the release note?

Juan.
_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]