On Fri, Oct 25, 2013 at 9:07 AM, Andrew Straw <[email protected]> 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 > [email protected] > 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
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
