Re: [Numpy-discussion] Integer overflow in test_einsum (1.7.1)

2013-05-14 Thread Toder, Evgeny
: [Numpy-discussion] Integer overflow in test_einsum (1.7.1) 14.05.2013 21:52, Toder, Evgeny kirjoitti: > So, does numpy implement modular (two's complement) > arithmetic for signed types [clip] Numpy leaves integer arithmetic to the C compiler. Python and its C modules however by defa

Re: [Numpy-discussion] Integer overflow in test_einsum (1.7.1)

2013-05-14 Thread Pauli Virtanen
14.05.2013 21:52, Toder, Evgeny kirjoitti: > So, does numpy implement modular (two’s complement) > arithmetic for signed types [clip] Numpy leaves integer arithmetic to the C compiler. Python and its C modules however by default specify -fwrapv for gcc and its ilk, so the behavior might seem cons

Re: [Numpy-discussion] Integer overflow in test_einsum (1.7.1)

2013-05-14 Thread Toder, Evgeny
guarantees? Eugene From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Charles R Harris Sent: Tuesday, May 14, 2013 2:25 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Integer overflow in test_einsum (1.7.1) I don't know if

Re: [Numpy-discussion] Integer overflow in test_einsum (1.7.1)

2013-05-14 Thread Charles R Harris
On Tue, May 14, 2013 at 11:26 AM, Toder, Evgeny wrote: > Hello, > > ** ** > > One of the test cases in test_einsum causes integer overflow for i2 type. > The test goes like this: > > ** ** > > >>> import numpy as np > > >>> dtype = 'i2' > > >>> n = 15 > > >>> a = np.arange(4*n

[Numpy-discussion] Integer overflow in test_einsum (1.7.1)

2013-05-14 Thread Toder, Evgeny
Hello, One of the test cases in test_einsum causes integer overflow for i2 type. The test goes like this: >>> import numpy as np >>> dtype = 'i2' >>> n = 15 >>> a = np.arange(4*n, dtype=dtype).reshape(4,n) >>> b = np.arange(n*6, dtype=dtype).reshape(n,6) >>> c = np.arange(24, dtype=dtype).reshap