asFloatArray

fun asFloatArray(): FloatArray

Ready the selected range from the tensor as floats. The tensor must be a of Tensor.DataType.FLOAT32, otherwise you cannot read its content as FloatArray.

Return

the selected range of the tensor content as float array.

Throws

if the tensor's datatype is not Tensor.DataType.FLOAT32.