tf.raw_ops.Angle
Stay organized with collections
Save and categorize content based on your preferences.
Returns the argument of a complex number.
tf.raw_ops.Angle(
input,
Tout=tf.dtypes.float32
,
name=None
)
Given a tensor input
of complex numbers, this operation returns a tensor of
type float
that is the argument of each element in input
. All elements in
input
must be complex numbers of the form \(a + bj\), where a
is the real part and b is the imaginary part.
The argument returned by this operation is of the form \(atan2(b, a)\).
For example:
# tensor 'input' is [-2.25 + 4.75j, 3.25 + 5.75j]
tf.math.angle(input) ==> [2.0132, 1.056]
Args |
input
|
A Tensor . Must be one of the following types: complex64 , complex128 .
|
Tout
|
An optional tf.DType from: tf.float32, tf.float64 . Defaults to tf.float32 .
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor of type Tout .
|
Equivalent to np.angle.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.Angle\n\nReturns the argument of a complex number.\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.Angle`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/Angle)\n\n\u003cbr /\u003e\n\n tf.raw_ops.Angle(\n input,\n Tout=../../tf/dtypes#float32,\n name=None\n )\n\nGiven a tensor `input` of complex numbers, this operation returns a tensor of\ntype `float` that is the argument of each element in `input`. All elements in\n`input` must be complex numbers of the form \\\\(a + bj\\\\), where *a*\nis the real part and *b* is the imaginary part.\n\nThe argument returned by this operation is of the form \\\\(atan2(b, a)\\\\).\n\n#### For example:\n\n # tensor 'input' is [-2.25 + 4.75j, 3.25 + 5.75j]\n tf.math.angle(input) ==\u003e [2.0132, 1.056]\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|-------------------------------------------------------------------------------------------------------------------------------|\n| `input` | A `Tensor`. Must be one of the following types: `complex64`, `complex128`. |\n| `Tout` | An optional [`tf.DType`](../../tf/dtypes/DType) from: `tf.float32, tf.float64`. Defaults to [`tf.float32`](../../tf#float32). |\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 `Tout`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nnumpy compatibility\n-------------------\n\n\u003cbr /\u003e\n\nEquivalent to np.angle.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]