larray.Array.broadcast_with¶
-
Array.
broadcast_with
(target, check_compatible=False) → larray.core.array.Array[source]¶ Returns an array that is (NumPy) broadcastable with target.
- all common axes must be either of length 1 or the same length
- extra axes in source can have any length and will be moved to the front
- extra axes in target can have any length and the result will have axes of length 1 for those axes
This is different from reshape which ensures the result has exactly the shape of the target.
Parameters: - target : Array or collection of Axis
- check_compatible : bool, optional
Whether or not to check that common axes are compatible. Defaults to False.
Returns: - Array