wrapByteArray

open fun <T : DType, V> wrapByteArray(shape: Shape, dtype: KClass<T>, data: ByteArray): Tensor<T, V>(source)

Wraps a ByteArray without copying (borrow semantics). The caller must ensure the array is not mutated while the tensor is in use.