class numpy.broadcast
[source]
Produce an object that mimics broadcasting.
Parameters: 


Returns: 

See also
Manually adding two vectors, using broadcasting:
>>> x = np.array([[1], [2], [3]]) >>> y = np.array([4, 5, 6]) >>> b = np.broadcast(x, y)
>>> out = np.empty(b.shape) >>> out.flat = [u+v for (u,v) in b] >>> out array([[5., 6., 7.], [6., 7., 8.], [7., 8., 9.]])
Compare against builtin broadcasting:
>>> x + y array([[5, 6, 7], [6, 7, 8], [7, 8, 9]])
Attributes: 


reset ()  Reset the broadcasted result’s iterator(s). 
© 2005–2019 NumPy Developers
Licensed under the 3clause BSD License.
https://docs.scipy.org/doc/numpy1.17.0/reference/generated/numpy.broadcast.html