numpy.broadcast_arrays() in Python

The numpy.broadcast_arrays() function broadcasts any number of arrays against each other.



 The numpy.broadcast_arrays() function has two parameters which are as follows:

*args: This parameter represents the arrays to broadcast.

subok: It is an optional parameter which take Boolean values. If it takes ‘True’ as a parameter, then sub-classes will be passed-through, else the returned arrays will be forced to be a base-class array (default).


This function returns a broadcasted list of arrays. These arrays are views on the original arrays. It is typically not contiguous. 

Example 1


Pin It on Pinterest

Share This