Converts the elements of an array to a different data type. Bare R inputs are directly materialized at the requested data type and are checked for out-of-range or missing values.
Arguments
- x
(
arrayish)
One input. Can be any data type. An R value materializes at its default data type.- dtype
(
character(1)|DataType)
Target data type. Can be any data type; the conversion is a value conversion, so it may lose precision or wrap around.
Value
(arrayish)
Has the given dtype and the input's shape.
StableHLO
Lowers to hlo_convert(), specified under
convert.