# dask.array.broadcast_arrays

### dask.array.broadcast_arrays(\*args, subok=False)

Broadcast any number of arrays against each other.

This docstring was copied from numpy.broadcast_arrays.

Some inconsistencies with the Dask version may exist.

* **Parameters:**
  **\*args**
  : The arrays to broadcast.

  **subok**
  : If True, then sub-classes will be passed-through, otherwise
    the returned arrays will be forced to be a base-class array (default).
* **Returns:**
  **broadcasted**
  : These arrays are views on the original arrays.  They are typically
    not contiguous.  Furthermore, more than one element of a
    broadcasted array may refer to a single memory location. If you need
    to write to the arrays, make copies first. While you can set the
    `writable` flag True, writing to a single output value may end up
    changing more than one location in the output array.
    <br/>
    #### Deprecated
    Deprecated since version 1.17: The output is currently marked so that if written to, a deprecation
    warning will be emitted. A future version will set the
    `writable` flag False so writing to it will raise an error.

#### SEE ALSO
`broadcast`

[`broadcast_to`](dask.array.broadcast_to.html.md#dask.array.broadcast_to)

`broadcast_shapes`

### Examples

```pycon
>>> import numpy as np
>>> 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]]))
```

Here is a useful idiom for getting contiguous copies instead of
non-contiguous views.

```pycon
>>> [np.array(a) for a in np.broadcast_arrays(x, y)]
[array([[1, 2, 3],
        [1, 2, 3]]),
 array([[4, 4, 4],
        [5, 5, 5]])]
```

<!-- !! processed by numpydoc !! -->
