# tf.raw_ops.Equal

<br />

Returns the truth value of (x == y) element-wise.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.Equal`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/Equal)

<br />

    tf.raw_ops.Equal(
        x, y, incompatible_shape_error=True, name=None
    )

> [!NOTE]
> **Note:** `Equal` supports broadcasting. More about broadcasting [here](http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html)

    x = tf.constant([2, 4])
    y = tf.constant(2)
    tf.math.equal(x, y) ==> array([True, False])

    x = tf.constant([2, 4])
    y = tf.constant([2, 4])
    tf.math.equal(x, y) ==> array([True,  True])

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A `Tensor`. |
| `y` | A `Tensor`. Must have the same type as `x`. |
| `incompatible_shape_error` | An optional `bool`. Defaults to `True`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `bool`. ||

<br />