[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.math.equal\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/math/equal) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/ops/math_ops.py#L1278-L1306) |\n\nReturns the truth value of (x == y) element-wise.\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tf.equal`](/api_docs/python/tf/math/equal)\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.equal`](/api_docs/python/tf/math/equal), [`tf.compat.v1.math.equal`](/api_docs/python/tf/math/equal)\n\n\u003cbr /\u003e\n\n tf.math.equal(\n x, y, name=None\n )\n\n#### Usage:\n\n x = tf.constant([2, 4])\n y = tf.constant(2)\n tf.math.equal(x, y) ==\u003e array([True, False])\n\n x = tf.constant([2, 4])\n y = tf.constant([2, 4])\n tf.math.equal(x, y) ==\u003e array([True, True])\n\n| **Note:** `Equal` supports broadcasting. More about broadcasting [here](https://docs.scipy.org/doc/numpy-1.13.0/user/basics.broadcasting.html)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|--------------------------------------------------|\n| `x` | A `Tensor` or `SparseTensor` or `IndexedSlices`. |\n| `y` | A `Tensor` or `SparseTensor` or `IndexedSlices`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` of type bool with the same size as that of x or y. ||\n\n\u003cbr /\u003e"]]