fromArray

fun fromArray(shape: ShapeND, array: IntArray): IntTensor(source)

Constructs a tensor with the specified shape and data.

Return

tensor with the shape shape and array data.

Parameters

shape

the desired shape for the tensor.

array

one-dimensional data array.