wrapByteArray

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

Wraps a ByteArray without copying. The caller must ensure the array is not mutated while the returned TensorData is in use. Default implementation falls back to fromByteArray (which copies).