latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.real
- tensorplay.functional.real(input) Tensor[source]
Returns a new tensor containing real values of the
selftensor. The returned tensor andselfshare the same underlying storage.- Parameters:
input (Tensor) – the input tensor.
Example:
>>> x=tensorplay.randn(4, dtype=tensorplay.cfloat) >>> x tensor([(0.3100+0.3553j), (-0.5445-0.7896j), (-1.6492-0.0633j), (-0.0638-0.8119j)]) >>> x.real tensor([ 0.3100, -0.5445, -1.6492, -0.0638])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

