On Wed, Dec 10, 2014 at 4:00 PM, Nathaniel Smith <n...@pobox.com> wrote:
> 2) Add a broadcast_to(arr, shape) function, which broadcasts the array > to exactly the shape given, or else errors out if this is not > possible. > I like np.broadcast_to as a new function. We can document it alongside broadcast and broadcast_arrays under array manipulation routines, which would make it at least as discoverable as the standard broadcasting functions. I'm not opposed to adding extra_shapes as a keyword argument to broadcast_arrays, but it seems unnecessarily complex, Implementation wise, I think it would actual make more sense to make broadcast_arrays depend on broadcast_to (e.g., by composing a function to calculate the broadcast shape with broadcast_to). Stephan
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion