[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# tf.compat.v1.math.sqrt\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/ops/math_ops.py#L5420-L5455) |\n\nComputes element-wise square root of the input tensor. \n\n tf.compat.v1.math.sqrt(\n x, name=None\n )\n\n**Note:** This operation does not support integer types. \n\n x = tf.constant([[4.0], [16.0]])\n tf.sqrt(x)\n \u003ctf.Tensor: shape=(2, 1), dtype=float32, numpy=\n array([[2.],\n [4.]], dtype=float32)\u003e\n y = tf.constant([[-4.0], [16.0]])\n tf.sqrt(y)\n \u003ctf.Tensor: shape=(2, 1), dtype=float32, numpy=\n array([[nan],\n [ 4.]], dtype=float32)\u003e\n z = tf.constant([[-1.0], [16.0]], dtype=tf.complex128)\n tf.sqrt(z)\n \u003ctf.Tensor: shape=(2, 1), dtype=complex128, numpy=\n array([[0.0+1.j],\n [4.0+0.j]])\u003e\n\n| **Note:** In order to support complex type, please provide an input tensor of `complex64` or `complex128`.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|--------------------------------------------------------------------------------------------------------------------|\n| `x` | A [`tf.Tensor`](../../../../tf/Tensor) of type `bfloat16`, `half`, `float32`, `float64`, `complex64`, `complex128` |\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 [`tf.Tensor`](../../../../tf/Tensor) of same size, type and sparsity as `x`. \u003cbr /\u003e If `x` is a `SparseTensor`, returns `SparseTensor(x.indices, tf.math.sqrt(x.values, ...), x.dense_shape)` ||\n\n\u003cbr /\u003e"]]