[SciPy-user] Bug on 0.4.9 ?

DE MENTEN Sebastien Sebastien.DEMENTEN at alumni.insead.edu
Thu Jun 8 02:42:10 CDT 2006


In scipy 0.4.9, you get your results if you compute cov(transpose(t))
instead of cov(t).
However, I do not know which one should be the standard.

> -----Original Message-----
> From: scipy-user-bounces at scipy.net
[mailto:scipy-user-bounces at scipy.net]
> On Behalf Of Antonio Arauzo Azofra
> Sent: Thursday, June 08, 2006 00:47
> To: scipy-user at scipy.net
> Cc: Jose Manuel Benitez Sanchez
> Subject: [SciPy-user] Bug on 0.4.9 ?
> 
> The following code works fine in Scipy 0.4.8, giving as covariance
> matrix result: 20.312516964192504 (i think the result should be a
matrix
> but this is not the case now. i supposse there will be some reason to
be
> a number).
> 
> Anyway, it is very strange that scipy.cov instead of returning a 1x1
> matrix or a number it returns a recurrent matrix full of NaNs :-?
> 
> Can anybody tell me if this is a bug or a problem on my instalation?
> 
>  >>> import scipy
>  >>> scipy.__version__ipy
> '0.4.9'
>  >>> t=[[85.0], [85.0], [86.0], [91.0], [87.0], [98.0], [88.0],
[88.0],
> [92.0], [90.0], [89.0], [82.0], [90.0], [86.0], [96.0], [91.0],
[89.0],
> [89.0], [91.0], [94.0], [92.0], [93.0], [90.0], [92.0], [90.0],
[88.0],
> [87.0], [86.0], [91.0], [93.0], [88.0], [94.0], [91.0], [85.0],
[79.0],
> [85.0], [89.0], [84.0], [89.0], [89.0], [86.0], [85.0], [88.0],
[92.0],
> [91.0], [83.0], [85.0], [92.0], [94.0], [87.0], [84.0], [96.0],
[90.0],
> [90.0], [90.0], [91.0], [87.0], [89.0], [85.0], [103.0], [90.0],
[90.0],
> [90.0], [87.0], [90.0], [86.0], [90.0], [87.0], [96.0], [91.0],
[95.0],
> [92.0], [89.0], [94.0], [92.0], [94.0], [88.0], [92.0], [92.0],
[84.0],
> [88.0], [86.0], [99.0], [88.0], [89.0], [90.0], [81.0], [89.0],
[92.0],
> [85.0], [92.0], [89.0], [90.0], [91.0], [91.0], [91.0], [88.0],
[87.0],
> [87.0], [87.0], [88.0], [90.0], [86.0], [92.0], [85.0], [89.0],
[91.0],
> [96.0], [79.0], [90.0], [89.0], [88.0], [92.0], [91.0], [83.0],
[90.0],
> [92.0], [93.0], [86.0], [97.0], [87.0], [86.0], [87.0], [92.0],
[90.0],
> [99.0], [92.0], [95.0], [92.0], [95.0], [90.0], [96.0], [95.0],
[92.0],
> [91.0], [90.0], [88.0], [100.0], [98.0], [91.0], [92.0], [93.0],
[90.0],
> [97.0], [93.0], [90.0], [92.0], [88.0], [89.0], [92.0], [92.0],
[93.0],
> [97.0], [84.0], [90.0], [92.0], [97.0], [91.0], [93.0], [92.0],
[90.0],
> [91.0], [92.0], [92.0], [86.0], [98.0], [92.0], [97.0], [93.0],
[94.0],
> [87.0], [88.0], [84.0], [94.0], [97.0], [92.0], [82.0], [88.0],
[95.0],
> [88.0], [91.0], [83.0], [91.0], [86.0], [91.0], [90.0], [90.0],
[89.0],
> [85.0], [85.0], [78.0], [88.0], [92.0], [91.0], [94.0], [88.0],
[88.0],
> [90.0], [87.0], [65.0], [90.0], [85.0], [88.0], [86.0], [82.0],
[86.0],
> [94.0], [87.0], [83.0], [93.0], [101.0], [92.0], [92.0], [86.0],
[85.0],
> [86.0], [86.0], [81.0], [91.0], [91.0], [92.0], [91.0], [93.0],
[87.0],
> [83.0], [95.0], [93.0], [84.0], [87.0], [86.0], [88.0], [90.0],
[88.0],
> [93.0], [98.0], [87.0], [94.0], [88.0], [89.0], [87.0], [93.0],
[88.0],
> [94.0], [91.0], [90.0], [91.0], [88.0], [82.0], [85.0], [91.0],
[98.0],
> [86.0], [89.0], [82.0], [83.0], [96.0], [94.0], [93.0], [93.0],
[91.0],
> [90.0], [87.0], [91.0], [86.0], [91.0], [88.0], [85.0], [89.0],
[95.0],
> [94.0], [96.0], [90.0], [94.0], [99.0], [94.0], [92.0], [87.0],
[92.0],
> [98.0], [92.0], [97.0], [93.0], [95.0], [99.0], [98.0], [92.0],
[96.0],
> [95.0], [86.0], [102.0], [85.0], [91.0], [91.0], [93.0], [98.0],
[82.0],
> [95.0], [97.0], [100.0], [88.0], [91.0], [92.0], [86.0], [91.0],
[87.0],
> [87.0], [99.0], [96.0], [98.0], [91.0]]
>  >>> a=scipy.array(t)
>  >>> scipy.cov(a)
> array([[                  nan,                   nan,
>                            nan, ...,                   nan,
>                            nan,                   nan],
>         [                  nan,                   nan,
>                            nan, ...,                   nan,
>                            nan,                   nan],
>         [                  nan,                   nan,
>                            nan, ...,                   nan,
>                            nan,                   nan],
>         ...,
>         [                  nan,                   nan,
>                            nan, ...,                   nan,
>                            nan,                   nan],
>         [                  nan,                   nan,
>                            nan, ...,                   nan,
>                            nan,                   nan],
>         [                  nan,                   nan,
>                            nan, ...,                   nan,
>                            nan,                   nan]])
> 
> --
> Regards,
>    Antonio Arauzo Azofra
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user



More information about the SciPy-user mailing list