Re: [Numpy-discussion] low level optimization in NumPy and minivect

2013-06-17 Thread Dag Sverre Seljebotn
On 06/17/2013 11:03 PM, Julian Taylor wrote: > On 17.06.2013 17:11, Frédéric Bastien wrote: >> Hi, >> >> I saw that recently Julian Taylor is doing many low level optimization >> like using SSE instruction. I think it is great. >> >> Last year, Mark Florisson released the minivect[1] project that h

Re: [Numpy-discussion] Profiling (was GSoC : Performance parity between numpy arrays and Python scalars)

2013-06-17 Thread Arink Verma
I am building numpy from source, python setup.py build --fcompiler=gnu95 then installation, python setup.py install --user, on ubuntu 13.04 for analysis results pprof --svg /usr/bin/python py.prof On Mon, Jun 17, 2013 at 10:04 PM, Nathaniel Smith wrote: > On Mon, Jun 17, 2013 at 4:29 PM, Arin

Re: [Numpy-discussion] low level optimization in NumPy and minivect

2013-06-17 Thread Julian Taylor
On 17.06.2013 17:11, Frédéric Bastien wrote: > Hi, > > I saw that recently Julian Taylor is doing many low level optimization > like using SSE instruction. I think it is great. > > Last year, Mark Florisson released the minivect[1] project that he > worked on during is master thesis. minivect is

Re: [Numpy-discussion] Profiling (was GSoC : Performance parity between numpy arrays and Python scalars)

2013-06-17 Thread Nathaniel Smith
On Mon, Jun 17, 2013 at 4:29 PM, Arink Verma wrote: > Hi Nathaniel > >> It's a probabilistic sampling profiler, so if it doesn't have enough >> samples then it can miss things. 227 samples is way way too low. You need to >> run the profiled code for longer (a few seconds at least), and if that's n

Re: [Numpy-discussion] Profiling (was GSoC : Performance parity between numpy arrays and Python scalars)

2013-06-17 Thread Arink Verma
> > > Not sure what you are profiling. The PyArray_DESCR call just returns a > pointer to the descr contained in an ndarray instance, so probably has > little relevance here. > I am profiling following code timeit.timeit('x+y',number=10,setup='import numpy as np;x = np.asarray(1.0);y = np

Re: [Numpy-discussion] Profiling (was GSoC : Performance parity between numpy arrays and Python scalars)

2013-06-17 Thread Charles R Harris
On Mon, Jun 17, 2013 at 9:29 AM, Arink Verma wrote: > Hi Nathaniel > > It's a probabilistic sampling profiler, so if it doesn't have enough >> samples then it can miss things. 227 samples is way way too low. You need >> to run the profiled code for longer (a few seconds at least), and if that's >

Re: [Numpy-discussion] Profiling (was GSoC : Performance parity between numpy arrays and Python scalars)

2013-06-17 Thread Arink Verma
Hi Nathaniel It's a probabilistic sampling profiler, so if it doesn't have enough > samples then it can miss things. 227 samples is way way too low. You need > to run the profiled code for longer (a few seconds at least), and if that's > not enough then maybe increase the sampling rate too (though

[Numpy-discussion] low level optimization in NumPy and minivect

2013-06-17 Thread Frédéric Bastien
Hi, I saw that recently Julian Taylor is doing many low level optimization like using SSE instruction. I think it is great. Last year, Mark Florisson released the minivect[1] project that he worked on during is master thesis. minivect is a compiler for element-wise expression that do some of the

Re: [Numpy-discussion] saving the lower half of matrix

2013-06-17 Thread Matthew Brett
Hi, On Mon, Jun 17, 2013 at 12:07 PM, Bala subramanian wrote: > Friends, > I have to save only the lower half of a symmetric matrix to a file. I used > numpy.tril to extract the lower half. However when i use 'numpy.savetxt', > numpy saves the whole matrix (with upper half values replaced as zero

Re: [Numpy-discussion] saving the lower half of matrix

2013-06-17 Thread Kumar Appaiah
On Mon, Jun 17, 2013 at 01:07:34PM +0200, Bala subramanian wrote: >Friends, >I have to save only the lower half of a symmetric matrix to a file. I used >numpy.tril to extract the lower half. However when i use 'numpy.savetxt', >numpy saves the whole matrix (with upper half values re

[Numpy-discussion] saving the lower half of matrix

2013-06-17 Thread Bala subramanian
Friends, I have to save only the lower half of a symmetric matrix to a file. I used numpy.tril to extract the lower half. However when i use 'numpy.savetxt', numpy saves the whole matrix (with upper half values replaced as zeros) rather than only the lower half. Any better idea to achieve this. as