[Numpy-discussion] argument handling by uniform

Eric Moore ewm at redtetrahedron.org
Fri Mar 13 12:02:32 EDT 2015


`low` and `high` can be arrays so, you received 1 draw from (-0.5, 201) and
1 draw from (0.5, 201).

Eric

On Fri, Mar 13, 2015 at 11:57 AM, Alan G Isaac <alan.isaac at gmail.com> wrote:

> Today I accidentally wrote `uni = np.random.uniform((-0.5,0.5),201)`,
> supply a tuple instead of separate low and high values.  This gave
> me two draws (from [0..201] I think).  My question: how were the
> arguments interpreted?
>
> Thanks,
> Alan Isaac
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150313/5ef8eaba/attachment.html>


More information about the NumPy-Discussion mailing list