#2512: implement condition number for matrices
------------------------------+---------------------------------------------
Reporter: schilly | Owner: was
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: linear algebra | Keywords: matrix, condition number
Author: Simon Spicer | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by schilly):
wow, this still exists. The doctest looks fine, is it possible to indent
the options for the argument? Apart from that I strongly suggest to use
numpy for that. They solve the 2-norm special case via svd and all the
others might be faster. They also have a -infinity case.
{{{
sage: from numpy.linalg.linalg import cond
sage: A = matrix([[1,2,4],[5,3,9],[7,8,6]])
sage: cond(A)
13.139632629120618
sage: cond(A, 1)
22.88636363636364
sage: cond(A, 'fro')
14.21690371493278
sage: import numpy as np
sage: cond(A, np.inf)
19.090909090909093
sage: cond(A, -np.inf)
2.5454545454545454
}}}
complex also works
{{{
sage: A = matrix([[1+2j, 1+3j], [1+1j, 0.5-0.5j]])
sage: cond(A, np.inf)
4.2200687516284452
sage: cond(A)
3.2255049266776936
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2512#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.