[Numpy-discussion] Formatting Results from linalg.eig()

Rich Shepard rshepard at appl-ecosys.com
Wed Apr 9 13:00:25 EDT 2008


   I'm using linalg.eig() and it works exactly as intended. The values of
the principal eigenvector are presented as real numbers (e.g.,
0.159317312615085), and I'm wondering if there's a way within NumPy to
multiply these values by 100 and limit the precision to 4 significant digits
(e.g., 15.93). If I was printing the results I could use format specifiers,
but these numbers are being inserted into a database table as well as being
displayed within wxPython widgets.

Rich



More information about the NumPy-Discussion mailing list