[SciPy-user] Structured matrices

Fri Mar 16 15:40:28 CDT 2007

```It is symmetric.  I was relying on someone else looking at this
and didn't double check it first.  I'll be more careful next time.

Thanks,
Barry

Fernando Perez <fperez.net@gmail.com> wrote: On 3/16/07, Barry Drake  wrote:
> Anand,
> Since the matrix is not symmetric, how can it be a covariance matrix?

Why do you say it's not symmetric?  Using Anne's beautiful one-liner:

In [223]: ss = lambda s: minimum.outer(r_[s:-1:-2],r_[s:-1:-2])

Checking for s=9:

In [224]: ss(9)
Out[224]:
array([[9, 7, 5, 3, 1],
[7, 7, 5, 3, 1],
[5, 5, 5, 3, 1],
[3, 3, 3, 3, 1],
[1, 1, 1, 1, 1]])

Structurally it seems pretty obvious they must be symmetric always,
and it's also straightforward to do an explicit check over a number of
sizes:

In [225]: sszero = lambda s: abs(ss(s)-ss(s).T).max()

In [226]: [sszero(n) for n in range(3,45,2)]
Out[226]: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Am I missing something?

Cheers,

f
_______________________________________________
SciPy-user mailing list
SciPy-user@scipy.org
http://projects.scipy.org/mailman/listinfo/scipy-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070316/5f6d8385/attachment.html
```