Converts the elements of a tensor to a different data type.
Arguments
- operand
(
tensorish)
Tensorish value of any data type.- dtype
(
character(1)|stablehlo::TensorDataType)
Target data type.- ambiguous
(
logical(1))
Whether the type is ambiguous. Ambiguous types usually arise from R literals (e.g.,1L,1.0) and follow special promotion rules. See thevignette("type-promotion")for more details.
Value
tensorish
Has the given dtype and the same shape as operand.
Ambiguity is controlled by the ambiguous parameter.
StableHLO
Lowers to stablehlo::hlo_convert().