[Numpy-discussion] NumPy 1.8.0rc2 release

Charles R Harris charlesr.harris at gmail.com
Fri Oct 25 12:45:34 EDT 2013


On Fri, Oct 25, 2013 at 7: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.]
>

This appears to have gotten fixed since rc2:

In [1]: 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.        ]])

In [2]: eigh(K)
Out[2]:
(array([-0.33333333, -0.33333333, -0.33333333,  0.99999999]),
 array([[-0.78251031,  0.37104402,  0.00198815,  0.5       ],
       [-0.29974269,  0.03728557,  0.81164285, -0.5       ],
       [ 0.54246491,  0.46764373,  0.48686874,  0.5       ],
       [-0.05969728, -0.80140218,  0.32278596,  0.5       ]]))

In [3]: np.__version__
Out[3]: '1.8.0.dev-ced0a94'

Could you try the current 1.8.x version on github and see if the problem
persists?

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


More information about the NumPy-Discussion mailing list