Re: Random Drawing Simulation -- performance issue

2006-09-13 Thread David J. Braden
David J. Braden wrote: > Travis E. Oliphant wrote: >> Brendon Towle wrote: >>> I need to simulate scenarios like the following: "You have a deck of >>> 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, >>> replace it, and repeat N times." >>> >> >> Thinking about the problem as

Re: Random Drawing Simulation -- performance issue

2006-09-13 Thread David J. Braden
Travis E. Oliphant wrote: > Brendon Towle wrote: >> I need to simulate scenarios like the following: "You have a deck of >> 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, >> replace it, and repeat N times." >> > > Thinking about the problem as drawing sample froms a discret

Re: Random Drawing Simulation -- performance issue

2006-09-13 Thread Brendon Towle
On 13 Sep 2006, at 1:01 AM, [EMAIL PROTECTED] wrote: > Date: 12 Sep 2006 20:17:47 -0700 > From: Paul Rubin <http://[EMAIL PROTECTED]> > Subject: Re: Random Drawing Simulation -- performance issue > To: python-list@python.org > > "Travis E. Oliphant" <[EM

Re: Random Drawing Simulation -- performance issue

2006-09-13 Thread Brendon Towle
On 12 Sep 2006, at 6:33 PM, [EMAIL PROTECTED] wrote: > Date: 12 Sep 2006 15:23:51 -0700 > From: "Simon Forman" <[EMAIL PROTECTED]> > Subject: Re: Random Drawing Simulation -- performance issue > > Brendon Towle wrote: >> I need to simulate scenarios like th

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Robert Kern
Paul Rubin wrote: > "Travis E. Oliphant" <[EMAIL PROTECTED]> writes: >>> I need to simulate scenarios like the following: "You have a deck of >>> 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, >>> replace it, and repeat N times." >>> >> Thinking about the problem as drawing samp

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Paul Rubin
"Travis E. Oliphant" <[EMAIL PROTECTED]> writes: > > I need to simulate scenarios like the following: "You have a deck of > > 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, > > replace it, and repeat N times." > > > Thinking about the problem as drawing sample froms a discrete >

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Travis E. Oliphant
Brendon Towle wrote: > I need to simulate scenarios like the following: "You have a deck of > 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, > replace it, and repeat N times." > Thinking about the problem as drawing sample froms a discrete distribution defined by the popu

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Simon Forman
Brendon Towle wrote: > I need to simulate scenarios like the following: "You have a deck of > 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, > replace it, and repeat N times." > > So, I wrote the following code, which works, but it seems quite slow > to me. Can anyone point out

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread David J. Braden
Brendon Towle wrote: > I need to simulate scenarios like the following: "You have a deck of 3 > orange cards, 5 yellow cards, and 2 blue cards. You draw a card, replace > it, and repeat N times." > > So, I wrote the following code, which works, but it seems quite slow to > me. Can anyone point

Random Drawing Simulation -- performance issue

2006-09-12 Thread Brendon Towle
I need to simulate scenarios like the following: "You have a deck of 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, replace it, and repeat N times." So, I wrote the following code, which works, but it seems quite slow to me. Can anyone point out some obvious thing that I'