<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/ops/numpy.py#L8725-L8738) |

Safe element-wise division which returns 0 where the denominator is 0.

#### View aliases


**Main aliases**

[`tf.keras.ops.numpy.divide_no_nan`](https://www.tensorflow.org/api_docs/python/tf/keras/ops/divide_no_nan)

<br />

    tf.keras.ops.divide_no_nan(
        x1, x2
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x1` | First input tensor. |
| `x2` | Second input tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The quotient `x1/x2`, element-wise, with zero where x2 is zero. ||

<br />