Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Wed, 2012-12-19 at 15:10 +, Nathaniel Smith wrote: snip Is this something that can be rolled into Numpy (the feature, not my particular implementation or interface - though I'd be happy for it to be so)? Regarding (b), I've written a test case that works for Linux on

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 08:12 +, Henry Gomersall wrote: On Wed, 2012-12-19 at 15:10 +, Nathaniel Smith wrote: snip Is this something that can be rolled into Numpy (the feature, not my particular implementation or interface - though I'd be happy for it to be so)?

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Wed, 2012-12-19 at 19:03 +0100, Francesc Alted wrote: The only scenario that I see that this would create unaligned arrays is for machines having AVX. But provided that the Intel architecture is making great strides in fetching unaligned data, I'd be surprised that the difference in

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Nathaniel Smith
On Thu, Dec 20, 2012 at 8:12 AM, Henry Gomersall h...@cantab.net wrote: On Wed, 2012-12-19 at 15:10 +, Nathaniel Smith wrote: snip Is this something that can be rolled into Numpy (the feature, not my particular implementation or interface - though I'd be happy for it to be so)?

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Francesc Alted
On 12/20/12 9:53 AM, Henry Gomersall wrote: On Wed, 2012-12-19 at 19:03 +0100, Francesc Alted wrote: The only scenario that I see that this would create unaligned arrays is for machines having AVX. But provided that the Intel architecture is making great strides in fetching unaligned data,

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 19.12.2012 09:40, Henry Gomersall wrote: I've written a few simple cython routines for assisting in creating byte-aligned numpy arrays. The point being for the arrays to work with SSE/AVX code. https://github.com/hgomersall/pyFFTW/blob/master/pyfftw/utils.pxi Why use Cython?

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 17:26 +0100, Sturla Molden wrote: On 19.12.2012 09:40, Henry Gomersall wrote: I've written a few simple cython routines for assisting in creating byte-aligned numpy arrays. The point being for the arrays to work with SSE/AVX code.

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 17:26 +0100, Sturla Molden wrote: return tmp[offset:offset+N]\ .view(dtype=d)\ .reshape(shape, order=order) Also, just for the email record, that should be return tmp[offset:offset+N*d.itemsize]\

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 19.12.2012 19:25, Henry Gomersall wrote: That is not true at least under Windows 32-bit. I think also it's not true for Linux 32-bit from my vague recollections of testing in a virtual machine. (disclaimer: both those statements _may_ be out of date). malloc is required to return memory

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 20.12.2012 17:47, Henry Gomersall wrote: On Thu, 2012-12-20 at 17:26 +0100, Sturla Molden wrote: return tmp[offset:offset+N]\ .view(dtype=d)\ .reshape(shape, order=order) Also, just for the email record, that should be return

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 17:48 +0100, Sturla Molden wrote: On 19.12.2012 19:25, Henry Gomersall wrote: That is not true at least under Windows 32-bit. I think also it's not true for Linux 32-bit from my vague recollections of testing in a virtual machine. (disclaimer: both those statements

[Numpy-discussion] === I REALLY NEED YOUR HELP OUR PYTHON USERS ====

2012-12-20 Thread Happyman
 Hi Python users,  First of all, Marry coming Cristmas!!! ALL THE BEST TO YOU AND YOUR FAMILY I need solution of integration under trapz() rule: There are following functions:   def  F1 (const1, x):       several calculations depending on bessel functions(mathematical functions) jn(), yv()

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 15:23 +0100, Francesc Alted wrote: On 12/20/12 9:53 AM, Henry Gomersall wrote: On Wed, 2012-12-19 at 19:03 +0100, Francesc Alted wrote: The only scenario that I see that this would create unaligned arrays is for machines having AVX. But provided that the Intel

Re: [Numpy-discussion] === I REALLY NEED YOUR HELP OUR PYTHON USERS ====

2012-12-20 Thread Dag Sverre Seljebotn
On 12/20/2012 07:32 PM, Happyman wrote: Hi Python users, First of all, Marry coming Cristmas!!! ALL THE BEST TO YOU AND YOUR FAMILY I need solution of integration under trapz() rule: There are following functions: def F1 (const1, x): several calculations depending on bessel

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 20.12.2012 18:38, Henry Gomersall wrote: Except I build with MinGW. Please don't tell me I need to install Visual Studio... I have about 1GB free on my windows partition! The same DLL is used as CRT. Sturla ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 20:50 +0100, Sturla Molden wrote: On 20.12.2012 18:38, Henry Gomersall wrote: Except I build with MinGW. Please don't tell me I need to install Visual Studio... I have about 1GB free on my windows partition! The same DLL is used as CRT. Perhaps the DLL should go

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 20.12.2012 20:52, Henry Gomersall wrote: Perhaps the DLL should go and read MS's edicts! Do you link with same same CRT as Python? (msvcr90.dll) You should always use -lmsvcr90. If you don't, you will link with msvcrt.dll. Sturla ___

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 20:57 +0100, Sturla Molden wrote: On 20.12.2012 20:52, Henry Gomersall wrote: Perhaps the DLL should go and read MS's edicts! Do you link with same same CRT as Python? (msvcr90.dll) You should always use -lmsvcr90. If you don't, you will link with msvcrt.dll.

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 20.12.2012 20:57, Sturla Molden wrote: On 20.12.2012 20:52, Henry Gomersall wrote: Perhaps the DLL should go and read MS's edicts! Do you link with same same CRT as Python? (msvcr90.dll) You should always use -lmsvcr90. If you don't, you will link with msvcrt.dll. Here is VS2008,

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 21:05 +0100, Sturla Molden wrote: On 20.12.2012 20:57, Sturla Molden wrote: On 20.12.2012 20:52, Henry Gomersall wrote: Perhaps the DLL should go and read MS's edicts! Do you link with same same CRT as Python? (msvcr90.dll) You should always use -lmsvcr90.

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 20.12.2012 21:03, Henry Gomersall wrote: Why is it important? (for my own understanding) Because if CRT resources are shared between different CRT versions, bad things will happen (the ABIs are not equivalent, errno and other globals are at different addresses, etc.) Cython code tends to

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 20.12.2012 21:13, Sturla Molden wrote: Because if CRT resources are shared between different CRT versions, bad things will happen (the ABIs are not equivalent, errno and other globals are at different addresses, etc.) For example, PyErr_SetFromErrno will return garbage if CRTs are shared.

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 21:13 +0100, Sturla Molden wrote: On 20.12.2012 21:03, Henry Gomersall wrote: Why is it important? (for my own understanding) Because if CRT resources are shared between different CRT versions, bad things will happen (the ABIs are not equivalent, errno and other

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Sturla Molden
On 20.12.2012 21:24, Henry Gomersall wrote: I didn't know that. It's a real pain having so many libc libs knocking around. I have little experience of Windows, as you may have guessed! Originally there was only one system-wide CRT on Windows (msvcrt.dll), which is why MinGW linkes with that

Re: [Numpy-discussion] Byte aligned arrays

2012-12-20 Thread Henry Gomersall
On Thu, 2012-12-20 at 21:45 +0100, Sturla Molden wrote: On 20.12.2012 21:24, Henry Gomersall wrote: I didn't know that. It's a real pain having so many libc libs knocking around. I have little experience of Windows, as you may have guessed! Originally there was only one system-wide CRT

Re: [Numpy-discussion] === RuntimeWarning: INVALID VALUE encountered in divide ====

2012-12-20 Thread Happyman
Well, If F1 is run in Python shell, everything is properly working, BUT if call through the functions it is wrongly answering!!!   def F1 (const1, x): # const1 should be complex number T1=round(2+x+4*x**(1.0/3.0)) T2=const1*x T3=const1**2 x1,x2,x3,x4 = sph_jnyn(T1, x) -- 1-standard function in

Re: [Numpy-discussion] MKL licenses for core scientific Python projects

2012-12-20 Thread Ralf Gommers
On Sat, Dec 15, 2012 at 2:13 PM, Ralf Gommers ralf.gomm...@gmail.comwrote: On Sat, Dec 15, 2012 at 5:06 AM, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: Ralf, Do these licenses allow fully free distribution of binaries? And are those binaries themselves redistributive? I.e.

[Numpy-discussion] Future of numpy (was: DARPA funding for Blaze and passing the NumPy torch)

2012-12-20 Thread Matthew Brett
Hi, [Travis wrote...] My strong suggestion is that development discussions of the project continue on this list with consensus among the active participants being the goal for development. I don't think 100% consensus is a rigid requirement --- but certainly a super-majority should be the

[Numpy-discussion] Travis-CI stopped supporting Python 3.1, but added 3.3

2012-12-20 Thread Ondřej Čertík
Hi, I noticed that the 3.1 tests are now failing. After clarification with the Travis guys: https://groups.google.com/d/topic/travis-ci/02iRu6kmwY8/discussion I've submitted a fix to our .travis.yml (and backported to 1.7): https://github.com/numpy/numpy/pull/2850

Re: [Numpy-discussion] Travis failures with no errors

2012-12-20 Thread Ondřej Čertík
On Thu, Dec 13, 2012 at 4:39 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote: Hi, I found these recent weird failures in Travis, but I can't find any problem with the log and all tests pass. Any ideas what is going on? https://travis-ci.org/numpy/numpy/jobs/3570123

Re: [Numpy-discussion] Future of numpy (was: DARPA funding for Blaze and passing the NumPy torch)

2012-12-20 Thread Nathaniel Smith
On Thu, Dec 20, 2012 at 11:46 PM, Matthew Brett matthew.br...@gmail.com wrote: Travis - I think you are suggesting that there should be no one person in charge of numpy, and I think this is very unlikely to work well. Perhaps there are good examples of well-led projects where there is not a

Re: [Numpy-discussion] DARPA funding for Blaze and passing the NumPy torch

2012-12-20 Thread Ondřej Čertík
Hi Travis, On Sun, Dec 16, 2012 at 10:07 PM, Travis Oliphant tra...@continuum.io wrote: Hello all, There is a lot happening in my life right now and I am spread quite thin among the various projects that I take an interest in. In particular, I am thrilled to publicly announce on this

Re: [Numpy-discussion] Future of numpy (was: DARPA funding for Blaze and passing the NumPy torch)

2012-12-20 Thread Ondřej Čertík
Hi Matthew, On Thu, Dec 20, 2012 at 3:46 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, [Travis wrote...] My strong suggestion is that development discussions of the project continue on this list with consensus among the active participants being the goal for development. I don't

Re: [Numpy-discussion] Future of numpy (was: DARPA funding for Blaze and passing the NumPy torch)

2012-12-20 Thread Ondřej Čertík
On Thu, Dec 20, 2012 at 5:48 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote: Hi Matthew, On Thu, Dec 20, 2012 at 3:46 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, [Travis wrote...] My strong suggestion is that development discussions of the project continue on this list with

Re: [Numpy-discussion] Travis failures with no errors

2012-12-20 Thread Charles R Harris
On Thu, Dec 20, 2012 at 6:25 PM, Ondřej Čertík ondrej.cer...@gmail.comwrote: On Thu, Dec 13, 2012 at 4:39 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote: Hi, I found these recent weird failures in Travis, but I can't find any problem with the log and all tests pass. Any ideas what is