Re: [Numpy-discussion] random seed replicate 2d randn with 1d loop

2011-05-23 Thread josef . pktd
On Mon, May 23, 2011 at 3:27 PM, Bruce Southey wrote: > On 05/23/2011 02:02 PM, Robert Kern wrote: >> On Mon, May 23, 2011 at 13:33,  wrote: >>> I have a function in two versions, one vectorized, one with loop >>> >>> the vectorized function  gets all randn variables in one big array >>> rvs = dis

Re: [Numpy-discussion] random seed replicate 2d randn with 1d loop

2011-05-23 Thread Keith Goodman
On Mon, May 23, 2011 at 12:34 PM, wrote: > Obviously I was working by columns, using a transpose worked, but > rewriting to axis=1 instead of axis=0 which should be more efficient > since I had almost all calculations by columns, I needed > params = map(lambda x: np.expand_dims(x, 1), params) >

Re: [Numpy-discussion] random seed replicate 2d randn with 1d loop

2011-05-23 Thread josef . pktd
On Mon, May 23, 2011 at 3:02 PM, Robert Kern wrote: > On Mon, May 23, 2011 at 13:33,   wrote: >> I have a function in two versions, one vectorized, one with loop >> >> the vectorized function  gets all randn variables in one big array >> rvs = distr.rvs(args, **{'size':(nobs, nrep)}) >> >> the loo

Re: [Numpy-discussion] random seed replicate 2d randn with 1d loop

2011-05-23 Thread Bruce Southey
On 05/23/2011 02:02 PM, Robert Kern wrote: > On Mon, May 23, 2011 at 13:33, wrote: >> I have a function in two versions, one vectorized, one with loop >> >> the vectorized function gets all randn variables in one big array >> rvs = distr.rvs(args, **{'size':(nobs, nrep)}) >> >> the looping versio

Re: [Numpy-discussion] random seed replicate 2d randn with 1d loop

2011-05-23 Thread Robert Kern
On Mon, May 23, 2011 at 13:33, wrote: > I have a function in two versions, one vectorized, one with loop > > the vectorized function  gets all randn variables in one big array > rvs = distr.rvs(args, **{'size':(nobs, nrep)}) > > the looping version has: >    for irep in xrange(nrep): >        rvs

Re: [Numpy-discussion] random seed replicate 2d randn with 1d loop

2011-05-23 Thread Keith Goodman
On Mon, May 23, 2011 at 11:42 AM, Keith Goodman wrote: > On Mon, May 23, 2011 at 11:33 AM,   wrote: >> I have a function in two versions, one vectorized, one with loop >> >> the vectorized function  gets all randn variables in one big array >> rvs = distr.rvs(args, **{'size':(nobs, nrep)}) >> >> t

Re: [Numpy-discussion] random seed replicate 2d randn with 1d loop

2011-05-23 Thread Keith Goodman
On Mon, May 23, 2011 at 11:33 AM, wrote: > I have a function in two versions, one vectorized, one with loop > > the vectorized function  gets all randn variables in one big array > rvs = distr.rvs(args, **{'size':(nobs, nrep)}) > > the looping version has: >    for irep in xrange(nrep): >        

[Numpy-discussion] random seed replicate 2d randn with 1d loop

2011-05-23 Thread josef . pktd
I have a function in two versions, one vectorized, one with loop the vectorized function gets all randn variables in one big array rvs = distr.rvs(args, **{'size':(nobs, nrep)}) the looping version has: for irep in xrange(nrep): rvs = distr.rvs(args, **{'size':nobs}) the rest should