[Scipy-tickets] [SciPy] #632: Matrix gallery aka test matrices

SciPy scipy-tickets@scipy....
Mon Apr 7 15:15:32 CDT 2008

```#632: Matrix gallery aka test matrices
--------------------------+-------------------------------------------------
Reporter:  nils          |       Owner:  somebody
Type:  enhancement   |      Status:  new
Priority:  normal        |   Milestone:  0.7
Component:  scipy.linalg  |     Version:  devel
Severity:  normal        |    Keywords:
--------------------------+-------------------------------------------------
I still think that a matrix gallery would be a useful addition for scipy.
AFAIK SciPy already support the following test matrices

{{{
hankel(c, r=None)
Construct a Hankel matrix.

The Hankel matrix has constant anti-diagonals, c as its first column,
and r as its last row (if not given, r == 0 os assumed).

toeplitz(c, r=None)
Construct a Toeplitz matrix.

The Toepliz matrix has constant diagonals, c as its first column,
and r as its first row (if not given, r == c is assumed).
}}}

Pascal matrix

{{{
def pascal(n):
""" Returns the (n+1) x (n+1) Pascal matrix
http://en.wikipedia.org/wiki/Pascal_matrix """
L_n = linalg.expm(diag(arange(1,n+1),-1))
U_n = linalg.expm(diag(arange(1,n+1),1))
return dot(L_n,U_n)
}}}

References:

[http://www.eecs.berkeley.edu/~wkahan/Mindless.pdf]
[http://www.mathworks.com/access/pub/testmatrix.ps]

--
Ticket URL: <http://scipy.org/scipy/scipy/ticket/632>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.
```