tensorFromInts

fun tensorFromInts(ctx: ExecutionContext, shape: IntArray, dtype: DType, data: IntArray): Tensor<*, *>(source)

Creates a tensor from an int array with the given shape and dtype.

Return

A new tensor containing the provided data.

Parameters

ctx

The execution context.

shape

The tensor dimensions.

dtype

The data type.

data

The int data to populate the tensor.