On Fri, Sep 10, 2010 at 6:32 PM, wrote:
> On Fri, Sep 10, 2010 at 8:28 PM, Charles R Harris
> wrote:
> >
> >
> > On Fri, Sep 10, 2010 at 6:15 PM, Charles R Harris
> > wrote:
> >>
> >>
> >> On Fri, Sep 10, 2010 at 5:46 PM, wrote:
> >>>
> >>> I saw some questions on the web how to create non-uni
On Fri, Sep 10, 2010 at 8:28 PM, Charles R Harris
wrote:
>
>
> On Fri, Sep 10, 2010 at 6:15 PM, Charles R Harris
> wrote:
>>
>>
>> On Fri, Sep 10, 2010 at 5:46 PM, wrote:
>>>
>>> I saw some questions on the web how to create non-uniform random
>>> integers in python.
>>>
>>> I don't know what th
On Fri, Sep 10, 2010 at 6:15 PM, Charles R Harris wrote:
>
>
> On Fri, Sep 10, 2010 at 5:46 PM, wrote:
>
>> I saw some questions on the web how to create non-uniform random
>> integers in python.
>>
>> I don't know what the best way is but here is another way that looks
>> reasonably fast
>>
>>
On Fri, Sep 10, 2010 at 5:46 PM, wrote:
> I saw some questions on the web how to create non-uniform random
> integers in python.
>
> I don't know what the best way is but here is another way that looks
> reasonably fast
>
> >>> rvs = np.dot(np.random.multinomial(1, [0.1, 0.2, 0.5, 0.2],
> size=10
I saw some questions on the web how to create non-uniform random
integers in python.
I don't know what the best way is but here is another way that looks
reasonably fast
>>> rvs = np.dot(np.random.multinomial(1, [0.1, 0.2, 0.5, 0.2],
>>> size=100),np.arange(4))
>>> np.bincount(rvs)/100.