% 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_can_cast}
\alias{torch_can_cast}
\title{Can_cast}
\usage{
torch_can_cast(from, to)
}
\arguments{
\item{from}{(dtype) The original \code{torch_dtype}.}

\item{to}{(dtype) The target \code{torch_dtype}.}
}
\description{
Can_cast
}
\section{can_cast(from, to) -> bool }{


Determines if a type conversion is allowed under PyTorch casting rules
described in the type promotion documentation .
}

\examples{
if (torch_is_installed()) {

torch_can_cast(torch_double(), torch_float())
torch_can_cast(torch_float(), torch_int())
}
}
