TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.functional.angle

tensorplay.functional.angle(input: Tensor, *, out: Tensor | None) → Tensor[source]

Computes the element-wise angle (in radians) of the given input tensor.

outi=angle(inputi)\text{out}_{i} = angle(\text{input}_{i})
Parameters:

input (Tensor) – the input tensor.

Keyword Arguments:

out (Tensor, optional) –

the output tensor.

zero for non-negative real numbers, and propagates NaNs. Previously the function would return zero for all real numbers and not propagate floating-point NaNs.

Example:

>>> tensorplay.angle(tensorplay.tensor([-1 + 1j, -2 + 2j, 3 - 3j]))*180/3.14159
tensor([ 135.,  135,  -45])

On this page

Ask DeepWiki