Skip to contents

Coerces a value to a DataType. Accepts data type strings (e.g. "f32", "i64", "bool") or existing DataType objects (they are returned unchanged).

Usage

as_dtype(x)

Arguments

x

A character string or DataType to convert.

Value

A DataType object.

Details

This is implemented via the generic tengen::as_dtype().

Examples

as_dtype("f32")
#> <f32>
as_dtype("i32")
#> <i32>