Python-Flint 0.3 eig()

34 views
Skip to first unread message

Yeti

unread,
Dec 17, 2018, 9:55:40 AM12/17/18
to mpmath
I have been experimenting with the new .eig() binding to the Arb library in Python (Thank you for the update) and one difference compared to mpmath is that the resulting eigenvalue, eigenvector pairs are not sorted in order. Was this intended? Users wanting a drop-in replacement for mpmath eig() might come across peculiar behaviour due to no sorting.

Is there currently a way to provide Python-Flint with the guesses of eigenvalues and eigenvectors for stage 1 and let it start at stage 2? (as discussed in your blog)

I am also unsure as to the behaviour of the ball radius when using arb_mat for matrices of real numbers. When using the "approx" method for .eig() the documentation says eigenvalues and/or eigenvectors are calculated approximately without error bounds (for acb_mats) yet when using the "approx" method, a error bound is still supplied for the real part. Is this just due to the wrapping of the .eig() method for complex valued matrices?


Thank you again for all your work

Fredrik Johansson

unread,
Dec 17, 2018, 8:41:21 PM12/17/18
to mpm...@googlegroups.com
Hello Yeti,

On Mon, Dec 17, 2018 at 3:55 PM Yeti <amusi...@gmail.com> wrote:
I have been experimenting with the new .eig() binding to the Arb library in Python (Thank you for the update) and one difference compared to mpmath is that the resulting eigenvalue, eigenvector pairs are not sorted in order. Was this intended? Users wanting a drop-in replacement for mpmath eig() might come across peculiar behaviour due to no sorting.

mpmath.eig() does not sort the eigenvalues in order either, but mpmath.eig_sort() does. Have I missed something?

Note that the order of complex eigenvalues is not well-defined. You can sort complex numbers in various ways, but the order will not be stable under small perturbations. Not a big issue for mpmath semantics, but doing it nicely in Arb is more complicated. It's fine to sort in a semi-arbitrary way just for aesthetics (in Arb the function _acb_vec_sort_pretty does this), but then there is a danger that users will start depending on the order as being mathematically meaningful!


Is there currently a way to provide Python-Flint with the guesses of eigenvalues and eigenvectors for stage 1 and let it start at stage 2? (as discussed in your blog)

No, this is not supported, but it should just take a few lines to add.

I am also unsure as to the behaviour of the ball radius when using arb_mat for matrices of real numbers. When using the "approx" method for .eig() the documentation says eigenvalues and/or eigenvectors are calculated approximately without error bounds (for acb_mats) yet when using the "approx" method, a error bound is still supplied for the real part. Is this just due to the wrapping of the .eig() method for complex valued matrices?

The error bound is actually zero; you can look at c.rad() to verify that. You're just seeing the default printing behavior in Arb. Printing an exact (zero radius) value still shows the error for the binary to decimal conversion.

Fredrik
Reply all
Reply to author
Forward
0 new messages