% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gen-namespace-docs.R,
%   R/gen-namespace-examples.R, R/gen-namespace.R
\name{torch_view_as_real}
\alias{torch_view_as_real}
\title{View_as_real}
\usage{
torch_view_as_real(self)
}
\arguments{
\item{self}{(Tensor) the input tensor.}
}
\description{
View_as_real
}
\section{view_as_real(input) -> Tensor }{


Returns a view of \code{input} as a real tensor. For an input complex tensor of
\code{size} \eqn{m1, m2, \dots, mi}, this function returns a new
real tensor of size \eqn{m1, m2, \dots, mi, 2}, where the last dimension of size 2
represents the real and imaginary components of complex numbers.
}

\section{Warning}{

\code{\link[=torch_view_as_real]{torch_view_as_real()}} is only supported for tensors with \verb{complex dtypes}.
}

\examples{
if (torch_is_installed()) {

if (FALSE) {
x <- torch_randn(4, dtype=torch_cfloat())
x
torch_view_as_real(x)
}
}
}
