[Numpy-discussion] argument handling by uniform
Sebastian Berg
sebastian at sipsolutions.net
Fri Mar 13 12:01:15 EDT 2015
On Fr, 2015-03-13 at 11:57 -0400, Alan G Isaac 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?
>
I think all of random broadcasts all of these arguments. So if you give
two bounds, then you get one of each, could even do a grid of parameter
combinations.
- Sebastian
> Thanks,
> Alan Isaac
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150313/cb7dd660/attachment.sig>
More information about the NumPy-Discussion
mailing list