Skip to contents

Returns the data type of a tensor (e.g. f32, i64).

Usage

dtype(x, ...)

Arguments

x

(tensorish)
A tensor-like object.

...

Additional arguments passed to methods (unused).

Value

A TensorDataType.

Details

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

See also

Examples

x <- nv_tensor(1:4, dtype = "f32")
dtype(x)
#> <f32>