numpy.broadcast_arrays() in Python

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

Syntax

Parameter

 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).

Return

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

Example 1

Output

Pin It on Pinterest

Share This