Re: [Numpy-discussion] aligned / unaligned structured dtype behavior

2013-03-07 Thread Kurt Smith
On Thu, Mar 7, 2013 at 12:26 PM, Frédéric Bastien wrote: > Hi, > > It is normal that unaligned access are slower. The hardware have been > optimized for aligned access. So this is a user choice space vs speed. The quantitative difference is still important, so this thread is useful for future ref

Re: [Numpy-discussion] aligned / unaligned structured dtype behavior (was: GSOC 2013)

2013-03-07 Thread Kurt Smith
On Thu, Mar 7, 2013 at 11:47 AM, Francesc Alted wrote: > On 3/6/13 7:42 PM, Kurt Smith wrote: > > Hmm, that clearly depends on the architecture. On my machine: > ... > That is, the unaligned column is 4x slower (!). numexpr allows somewhat > better results: > ... > Yes, in this case, the unalign

Re: [Numpy-discussion] Definition of dot function

2013-03-07 Thread Nathaniel Smith
On 7 Mar 2013 20:27, "Henry Gomersall" wrote: > > On Thu, 2013-03-07 at 13:36 -0600, Mayank Daga wrote: > > Can someone point me to the definition of dot() in the numpy source? > > The only instance of 'def dot()' I found was in numpy/ma/extras.py but > > that does not seem to be the correct one.

Re: [Numpy-discussion] Definition of dot function

2013-03-07 Thread Henry Gomersall
On Thu, 2013-03-07 at 13:36 -0600, Mayank Daga wrote: > Can someone point me to the definition of dot() in the numpy source? > The only instance of 'def dot()' I found was in numpy/ma/extras.py but > that does not seem to be the correct one. It seems to be in a dynamic library. In [9]: numpy.dot.

[Numpy-discussion] Definition of dot function

2013-03-07 Thread Mayank Daga
Hi, Can someone point me to the definition of dot() in the numpy source? The only instance of 'def dot()' I found was in numpy/ma/extras.py but that does not seem to be the correct one. ~mayank -- Mayank Daga "Nothing Succeeds Like Success" ___ NumPy-

Re: [Numpy-discussion] feature tracking in numpy/scipy

2013-03-07 Thread Benjamin Root
On Sat, Mar 2, 2013 at 5:32 PM, Scott Collis wrote: > Good afternoon list, > I am looking at feature tracking in a 2D numpy array, along the lines of > Dixon and Wiener 1993 (for tracking precipitating storms) > > Identifying features based on threshold is quite trivial using > ndimage.label > >

Re: [Numpy-discussion] aligned / unaligned structured dtype behavior

2013-03-07 Thread Frédéric Bastien
Hi, It is normal that unaligned access are slower. The hardware have been optimized for aligned access. So this is a user choice space vs speed. We can't go around that. We can only minimize the cost of unaligned access in some cases, but not all and those optimization depend of the CPU. But newer

Re: [Numpy-discussion] aligned / unaligned structured dtype behavior

2013-03-07 Thread Francesc Alted
On 3/7/13 6:47 PM, Francesc Alted wrote: > On 3/6/13 7:42 PM, Kurt Smith wrote: >> And regarding performance, doing simple timings shows a 30%-ish >> slowdown for unaligned operations: >> >> In [36]: %timeit packed_arr['b']**2 >> 100 loops, best of 3: 2.48 ms per loop >> >> In [37]: %timeit aligned

Re: [Numpy-discussion] aligned / unaligned structured dtype behavior (was: GSOC 2013)

2013-03-07 Thread Francesc Alted
On 3/6/13 7:42 PM, Kurt Smith wrote: > And regarding performance, doing simple timings shows a 30%-ish > slowdown for unaligned operations: > > In [36]: %timeit packed_arr['b']**2 > 100 loops, best of 3: 2.48 ms per loop > > In [37]: %timeit aligned_arr['b']**2 > 1000 loops, best of 3: 1.9 ms per l

Re: [Numpy-discussion] polyfit with fixed points

2013-03-07 Thread Charles R Harris
On Thu, Mar 7, 2013 at 9:22 AM, eat wrote: > Hi, > > On Thu, Mar 7, 2013 at 1:52 AM, Jaime Fernández del Río < > jaime.f...@gmail.com> wrote: > >> On Tue, Mar 5, 2013 at 5:23 AM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> >>> >>> On Tue, Mar 5, 2013 at 12:41 AM, Jaime Fernánde

[Numpy-discussion] scipy.optimize.fminbound bound violation

2013-03-07 Thread Alan G Isaac
Under what conditions should I expect fminbound to call the supplied function with argument values substantially outside the user-provided bounds? Thanks, Alan Isaac ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailm