Re: [Numpy-discussion] Numpy correlate

2013-03-20 Thread Pierre Haessig
Hi, Le 19/03/2013 08:12, Sudheer Joseph a écrit : *Thank you Pierre,* It appears the numpy.correlate uses the frequency domain method for getting the ccf. I would like to know how serious or exactly what is the issue with normalization?. I have computed cross

Re: [Numpy-discussion] Dot/inner products with broadcasting?

2013-03-20 Thread Jaakko Luttinen
I tried using this inner1d as an alternative to dot because it uses broadcasting. However, I found something surprising: Not only is inner1d much much slower than dot, it is also slower than einsum which is much more general: In [68]: import numpy as np In [69]: import numpy.core.gufuncs_linalg

[Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Colin J. Williams
I have a small program which builds random matrices for increasing matrix orders, inverts the matrix and checks the precision of the product.  At some point, one would expect operations to fail, when the memory capacity is exceeded.  In both Python 2.7

[Numpy-discussion] numpy array to C API

2013-03-20 Thread Søren
Greetings I'm extending our existing C/C++ software with Python/Numpy in order to do extra number crunching. It already works like a charm calling python with the C API Python.h. But what is the proper way of passing double arrays returned from Python/Numpy routines back to C? I came across

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Daπid
Without much detailed knowledge of the topic, I would expect both versions to give very similar timing, as it is essentially a call to ATLAS function, not much is done in Python. Given this, maybe the difference is in ATLAS itself. How have you installed it? When you compile ATLAS, it will do

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Jens Nielsen
Hi, Could also be that they are linked to different libs such as atlas and standart Blas. What is the output of numpy.show_config() in the two different python versions. Jens On Wed, Mar 20, 2013 at 2:14 PM, Daπid davidmen...@gmail.com wrote: Without much detailed knowledge of the topic, I

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Frédéric Bastien
Hi, win32 do not mean it is a 32 bits windows. sys.platform always return win32 on 32bits and 64 bits windows even for python 64 bits. But that is a good question, is your python 32 or 64 bits? Fred On Wed, Mar 20, 2013 at 10:14 AM, Daπid davidmen...@gmail.com wrote: Without much detailed

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Colin J. Williams
On 20/03/2013 10:14 AM, Daπid wrote: Without much detailed knowledge of the topic, I would expect both versions to give very similar timing, as it is essentially a call to ATLAS function, not much is done in Python. Given this, maybe the difference is in ATLAS itself.

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Colin J. Williams
On 20/03/2013 10:29 AM, Jens Nielsen wrote: Hi,  Could also be that they are linked to different libs such as atlas and standart Blas. What is the output of  numpy.show_config() in the two different python

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Colin J. Williams
On 20/03/2013 10:30 AM, Frédéric Bastien wrote: Hi, win32 do not mean it is a 32 bits windows. sys.platform always return win32 on 32bits and 64 bits windows even for python 64 bits. But that is a good question, is your python 32 or 64 bits? 32 bits. Colin W. Fred On Wed, Mar 20, 2013

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Jens Nielsen
The python3 version is compiled without any optimised library and is falling back on a slow version. Where did you get this installation from? Jens On Wed, Mar 20, 2013 at 3:01 PM, Colin J. Williams cjwilliam...@gmail.comwrote: On 20/03/2013 10:30 AM, Frédéric Bastien wrote: Hi, win32

Re: [Numpy-discussion] Dot/inner products with broadcasting?

2013-03-20 Thread Jaakko Luttinen
Well, thanks to seberg, I finally noticed that there is a dot product function in this new module numpy.core.gufuncs_linalg, it was just named differently (matrix_multiply instead of dot). However, I may have found a bug in it: import numpy.core.gufuncs_linalg as gula A =

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Frédéric Bastien
On Wed, Mar 20, 2013 at 11:01 AM, Colin J. Williams cjwilliam...@gmail.com wrote: On 20/03/2013 10:30 AM, Frédéric Bastien wrote: Hi, win32 do not mean it is a 32 bits windows. sys.platform always return win32 on 32bits and 64 bits windows even for python 64 bits. But that is a good

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Colin J. Williams
On 20/03/2013 11:06 AM, Jens Nielsen wrote: The python3 version is compiled without any optimised library and is falling back on a slow version. Where did you get this installation from? Jens From the

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Colin J. Williams
On 20/03/2013 11:12 AM, Frédéric Bastien wrote: On Wed, Mar 20, 2013 at 11:01 AM, Colin J. Williams cjwilliam...@gmail.com wrote: On 20/03/2013 10:30 AM, Frédéric Bastien wrote: Hi, win32 do not mean it is a 32 bits windows.

Re: [Numpy-discussion] Add ability to disable the autogeneration of the function signature in a ufunc docstring.

2013-03-20 Thread Warren Weckesser
On Fri, Mar 15, 2013 at 4:39 PM, Nathaniel Smith n...@pobox.com wrote: On Fri, Mar 15, 2013 at 6:47 PM, Warren Weckesser warren.weckes...@gmail.com wrote: Hi all, In a recent scipy pull request (https://github.com/scipy/scipy/pull/459), I ran into the problem of ufuncs automatically

Re: [Numpy-discussion] Dot/inner products with broadcasting?

2013-03-20 Thread Oscar Villellas
Reproduced it. I will take a look at it. That error comes direct from BLAS and shouldn't be happening. I will also look why inner1d is not performing well. Note: inner1d is implemented with calls to BLAS (dot). I will get back to you later :) On Wed, Mar 20, 2013 at 4:10 PM, Jaakko Luttinen

Re: [Numpy-discussion] Add ability to disable the autogeneration of the function signature in a ufunc docstring.

2013-03-20 Thread Nathaniel Smith
On 20 Mar 2013 17:11, Warren Weckesser warren.weckes...@gmail.com wrote: On Fri, Mar 15, 2013 at 4:39 PM, Nathaniel Smith n...@pobox.com wrote: On Fri, Mar 15, 2013 at 6:47 PM, Warren Weckesser warren.weckes...@gmail.com wrote: Hi all, In a recent scipy pull request

Re: [Numpy-discussion] how to efficiently select multiple slices from an array?

2013-03-20 Thread Andreas Hilboll
Hey, On Wed, 2013-03-20 at 16:31 +0100, Andreas Hilboll wrote: Cross-posting a question I asked on SO (http://stackoverflow.com/q/15527666/152439): Given an array d = np.random.randn(100) and an index array i = np.random.random_integers(low=3, high=d.size - 5, size=20) how

Re: [Numpy-discussion] numpy array to C API

2013-03-20 Thread Chris Barker - NOAA Federal
On Wed, Mar 20, 2013 at 9:03 AM, Robert Kern robert.k...@gmail.com wrote: I highly recommend using an existing tool to write this interface, to take care of the reference counting, etc for you. Cython is particularly nice. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response