From: Travis O. <oli...@ee...> - 2006-07-19 21:25:55
|
Kevin Jacobs <ja...@bi...> wrote: > On 7/19/06, *Travis Oliphant* <oli...@ie... > <mailto:oli...@ie...>> wrote: > > Kevin Jacobs <ja...@bi... > <mailto:ja...@bi...>> wrote: > > On 7/19/06, *Kevin Jacobs <ja...@bi... > <mailto:ja...@bi...> > > <mailto: ja...@bi... > <mailto:ja...@bi...>>>* <bio...@gm... > <mailto:bio...@gm...> > > <mailto:bio...@gm... <mailto:bio...@gm...>>> > wrote: > > > > Is it expected that the following script would spend over > half of > > the total execution time in > defmatrix.py:103(__array_finalize__)? > > > > > > Confirmed that a similar overhead exists for arrays, though not as > > extreme. My application requires the ability to assign random > > elements, so any speed ups here will result be quite significant. > > > There is an optimization for this kind of assignment in current NumPy > SVN which "should" avoid the array creation over-head. > > > > There still seems to be a huge performance penalty with using a matrix > to set elements. Consider this code where X is initially a matrix: Are you now using SVN NumPy, or are we still looking at NumPy 0.9.8 numbers? -Travis |