[Numpy-discussion] NumPy 1.8.0rc2 release

alex argriffi at ncsu.edu
Fri Oct 25 09:32:43 EDT 2013


On Fri, Oct 25, 2013 at 9:07 AM, Andrew Straw <dr.andrew.straw at gmail.com>
wrote:
>
> Hi,
>
> I found an unexpected difference from numpy 1.7.1 and 1.8.0rc2 with
Python 3.3.2 on Ubuntu 12.04 (amd64). Here is the test program:
>
> import numpy as np
> print(np.__version__)
> K = np.array([[ 0.        ,  0.        ,  0.        ,  0.        ],
>               [-0.33333333,  0.        ,  0.        ,  0.        ],
>               [ 0.33333333, -0.33333333,  0.        ,  0.        ],
>               [ 0.33333333, -0.33333333,  0.33333333,  0.        ]])
> w, V = np.linalg.eigh(K)
> print('w')
> print(w)
>
> with numpy 1.7.1:
>
> 1.7.1
> w
> [-0.33333333 -0.33333333 -0.33333333  0.99999999]
>
> with numpy 1.8.0rc2:
>
> 1.8.0rc2
> w
> [ 0.  0.  0.  0.]
>
> Apologies if this is my mistake!
> -Andrew
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>

My first reaction was to think that eigh would not have guarantees because
the matrix is not hermitian, but now I see that eigh deliberately uses the
upper vs. lower part according to the UPLO arg which is documented as
defaulting to 'L', so I see why this difference between numpy versions is
an unexpected problem.

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131025/a35724b7/attachment.html>


More information about the NumPy-Discussion mailing list