'Compute the singular values of a Matrix
Examples
>>> from sympy import Matrix, Symbol
>>> x = Symbol(\'x\', real=True)
>>> A = Matrix([[0, 1, 0], [0, x, 0], [-1, 0, 0]])
>>> A.singular_values()
[sqrt(x**2 + 1), 1, 0]
See Also
condition_number'

def singular_values(self):

    mat = self
    valmultpairs = (mat.H * mat).eigenvals()
    vals = []
    for (k, v) in valmultpairs.items():
        vals += ([sqrt(k)] * v)
    vals.sort(reverse=True, key=default_sort_key)
    return vals
