[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.Rank\n\n\u003cbr /\u003e\n\nReturns the rank of a tensor.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.Rank`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/Rank)\n\n\u003cbr /\u003e\n\n tf.raw_ops.Rank(\n input, name=None\n )\n\nThis operation returns an integer representing the rank of `input`.\n\n#### For example:\n\n # 't' is [[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]\n # shape of tensor 't' is [2, 2, 3]\n rank(t) ==\u003e 3\n\n| **Note:** The rank of a tensor is not the same as the rank of a matrix. The rank of a tensor is the number of indices required to uniquely select each element of the tensor. Rank is also known as \"order\", \"degree\", or \"ndims.\"\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|--------------------------------------|\n| `input` | A `Tensor`. |\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 `int32`. ||\n\n\u003cbr /\u003e"]]