Re: [Numpy-discussion] Optimization suggestion sought

2011-01-01 Thread Enzo Michelangeli
- Original Message - From: Robert Bradshaw rober...@math.washington.edu Sent: Wednesday, December 29, 2010 4:47 PM [...] Regarding Justin's suggestion, before trying Cython (which, according to http://wiki.cython.org/tutorials/numpy , seems to require a bit of work to handle numpy

Re: [Numpy-discussion] Optimization suggestion sought

2010-12-29 Thread Robert Bradshaw
On Mon, Dec 27, 2010 at 6:20 AM, Enzo Michelangeli enzom...@gmail.com wrote: Many thanks to Josef and Justin for their replies. Josef's hint sounds like a good way of reducing peak memory allocation especially when the row size is large, which makes the for overhead for each iteration

Re: [Numpy-discussion] Optimization suggestion sought

2010-12-27 Thread Enzo Michelangeli
- Original Message - From: Justin Peel jpsc...@gmail.com To: Discussion of Numerical Python numpy-discussion@scipy.org Sent: Monday, December 27, 2010 2:51 PM Subject: Re: [Numpy-discussion] Optimization suggestion sought On Sun, Dec 26, 2010 at 7:34 AM, josef.p...@gmail.com wrote: On Sun, Dec 26

[Numpy-discussion] Optimization suggestion sought

2010-12-26 Thread Enzo Michelangeli
For a pivoted algorithm, I have to perform an operation that in fully vectorized form can be expressed as: pivot = tableau[locat,:]/tableau[locat,cand] tableau -= tableau[:,cand:cand+1]*pivot tableau[locat,:] = pivot tableau is a rather large bidimensional array, and I'd like to

Re: [Numpy-discussion] Optimization suggestion sought

2010-12-26 Thread josef . pktd
On Sun, Dec 26, 2010 at 3:51 AM, Enzo Michelangeli enzom...@gmail.com wrote: For a pivoted algorithm, I have to perform an operation that in fully vectorized form can be expressed as:    pivot = tableau[locat,:]/tableau[locat,cand]    tableau -= tableau[:,cand:cand+1]*pivot    

Re: [Numpy-discussion] Optimization suggestion sought

2010-12-26 Thread Justin Peel
On Sun, Dec 26, 2010 at 7:34 AM, josef.p...@gmail.com wrote: On Sun, Dec 26, 2010 at 3:51 AM, Enzo Michelangeli enzom...@gmail.com wrote: For a pivoted algorithm, I have to perform an operation that in fully vectorized form can be expressed as:    pivot = tableau[locat,:]/tableau[locat,cand]