<!--
This file is generated by a tool. Do not edit directly.
For open-source contributions the docs will be updated automatically.
-->

*Last updated: 2023-03-16.*

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tf_quant_finance.utils.broadcast_tensors" />
<meta itemprop="path" content="Stable" />
</div>

# tf_quant_finance.utils.broadcast_tensors

<!-- Insert buttons and diff -->

<table class="tfo-notebook-buttons tfo-api" align="left">
</table>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/utils/shape_utils.py">View source</a>



Broadcasts arguments to the common shape.

```python
tf_quant_finance.utils.broadcast_tensors(
    *, name=None, *args
)
```



<!-- Placeholder for "Used in" -->

#### Example
```python
import tensorflow as tf
import tf_quant_finance as tff

args = [tf.ones([1, 2], dtype=tf.float64), tf.constant([[True], [False]])]
tff.utils.broadcast_tensor_shapes(*args)
# Expected: (array([[1., 1.], [1., 1.]]),
#            array([[True, True], [False, False]])
```

#### Args:


* <b>`*args`</b>: A sequence of `Tensor`s of compatible shapes and any `dtype`s.
* <b>`name`</b>: Python string. The name to give to the ops created by this function.
  Default value: `None` which maps to the default name
  `broadcast_tensor_shapes`.


#### Returns:

A tuple of broadcasted `Tensor`s. Each `Tensor` has the same `dtype` as the
corresponding input `Tensor`.



#### Raises:


* <b>`ValueError`</b>: If inputs are of incompatible shapes.