On Fri, Mar 13, 2015 at 3:57 PM, Alan G Isaac <alan.is...@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?

Broadcast against each other. Roughly equivalent to:

uni = np.array([
  np.random.uniform(-0.5, 201),
  np.random.uniform(0.5, 201),
])

--
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to