[SciPy-dev] eig, eigh, and symeig in scipy

Nathan Bell wnbell@gmail....
Tue Oct 28 12:40:05 CDT 2008


On Tue, Oct 28, 2008 at 1:30 PM, Tiziano Zito <opossumnano@gmail.com> wrote:
>
> - In the symeig test suite we use two very useful routines:
>  random_rot and symrand. Their docstrings:
>
>  random_rot:
>    """Return a random rotation matrix, drawn from the Haar distribution
>    (the only uniform distribution on SO(n)).
>    The algorithm is described in the paper
>    Stewart, G.W., "The efficient generation of random orthogonal
>    matrices with an application to condition estimators", SIAM Journal
>    on Numerical Analysis, 17(3), pp. 403-409, 1980.
>    For more information see
>    http://en.wikipedia.org/wiki/Orthogonal_matrix#Randomization"""
>
>  symrand:
>    """Return a random symmetric (Hermitian) matrix.
>
>    If 'dim_or_eigv' is an integer N, return a NxN matrix, with eigenvalues
>        uniformly distributed on (0,1].
>
>    If 'dim_or_eigv' is  1-D real array 'a', return a matrix whose
>                      eigenvalues are sort(a)."""
>
>  Do you think these routines may be a useful addition to scipy, or
>  should I keep them hidden in the tests?
>

I'd like to see these and many others in a hypothetical scipy.gallery
module.  That's unlikely to happen before 0.7, so you'll probably want
to hide them in the unittest files for now.

FWIW we have a small set of sparse matrix generators that we use pyamg here:
http://code.google.com/p/pyamg/source/browse/#svn/trunk/pyamg/gallery

-- 
Nathan Bell wnbell@gmail.com
http://graphics.cs.uiuc.edu/~wnbell/


More information about the Scipy-dev mailing list