Converts the elements of an array to a different data type.
Arguments
- operand
(
arrayish)
Arrayish value of any data type.- dtype
(
character(1)|tengen::DataType)
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
arrayish
Has the given dtype and the same shape as operand.
Ambiguity is controlled by the ambiguous parameter.
StableHLO
Lowers to stablehlo::hlo_convert().