api / koma.internal.default.generated.ndarray / DefaultByteNDArray / <init>

<init>

DefaultByteNDArray(vararg shape:Int, init: (IntArray) ->Byte)

An (unoptimized) implementation of NDArray in pure Kotlin, for portability between the different platforms koma supports.

Parameters

shape - A vararg specifying the size of each dimension, e.g. a 3D array with size 4x6x8 would pass in 4,6,8)

init - A function that takes a location in the new array and returns its initial value.