asIntArray

fun asIntArray(): IntArray

Reads the selected range from the tensor as integers. The tensor must be of Tensor.DataType.INT32, otherwise you cannot read its content as IntArray.

Return

The selected range of the tensor content as integer array.

Throws

If the tensor's datatype is not Tensor.DataType.INT32.