[Numpy-discussion] where support full broadcasting, right?
David Goldsmith
d.l.goldsmith at gmail.com
Thu Jul 1 20:53:02 EDT 2010
Hi. The docstring (in the wiki) for where states:
x, y : array_like, optionalValues from which to choose. *x* and *y* need to
have the same shape as *condition*.But:
>>> x = np.eye(2)
>>> np.where(x,2,3)
array([[2, 3],
[3, 2]])
So apparently where supports broadcasting of scalars at least; does it
provide full broadcasting support?
Thanks!
DG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100701/984361cb/attachment.html>
More information about the NumPy-Discussion
mailing list