[Numpy-discussion] could anyone check on a 32bit system?

Matthew Brett matthew.brett@gmail....
Tue Apr 30 23:16:38 CDT 2013


Hi,

On Tue, Apr 30, 2013 at 8:08 PM, Yaroslav Halchenko
<lists@onerussian.com> wrote:
> could anyone on 32bit system with fresh numpy (1.7.1) test following:
>
>> wget -nc http://www.onerussian.com/tmp/data.npy ; python -c 'import numpy as np; data1 = np.load("/tmp/data.npy"); print  np.sum(data1[1,:,0,1]) - np.sum(data1, axis=1)[1,0,1]'
>
> 0.0
>
> because unfortunately it seems on fresh ubuntu raring (in 32bit build only,
> seems ok in 64 bit... also never ran into it on older numpy releases):
>
>> python -c 'import numpy as np; data1 = np.load("/tmp/data.npy"); print  np.sum(data1[1,:,0,1]) - np.sum(data1, axis=1)[1,0,1]'
> -1.11022302463e-16
>
> PS detected by failed tests of pymvpa

Reduced case on numpy 1.7.1, 32-bit Ubuntu 12.04.2

In [64]: data = np.array([[ 0.49505185,  0.47212842],
       [ 0.53529587,  0.04366172],
       [-0.13461665, -0.01664215]])

In [65]: np.sum(data[:, 0]) - np.sum(data, axis=0)[0]
Out[65]: 1.1102230246251565e-16

No difference for single vector:

In [4]: data1 = data[:, 0:1]

In [5]: np.sum(data1[:, 0]) - np.sum(data1, axis=0)[0]
Out[5]: 0.0

Puzzling to me...

Cheers,

Matthew


More information about the NumPy-Discussion mailing list