mxnet.numpy.stride_tricks¶
Util functions with broadcast.
Functions
|
Broadcast any number of arrays against each other. |
- mxnet.numpy.stride_tricks.broadcast_arrays(*args)[source]¶
Broadcast any number of arrays against each other.
- Parameters:
*args (a list of ndarrays) – The arrays to broadcast.
- Returns:
broadcasted – These arrays are copies of the original arrays unless that all the input arrays have the same shape, the input list of arrays are returned instead of a list of copies.
- Return type:
list of arrays
Examples
>>> x = np.array([[1,2,3]]) >>> y = np.array([[4],[5]]) >>> np.broadcast_arrays(x, y) [array([[1., 2., 3.], [1., 2., 3.]]), array([[4., 4., 4.], [5., 5., 5.]])]