[SciPy-user] Bug on 0.4.9 ?

Antonio Arauzo Azofra arauzo at decsai.ugr.es
Wed Jun 7 17:46:38 CDT 2006


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



More information about the SciPy-user mailing list