kotlin-numpy / org.jetbrains.numkt.core / repeat

repeat

fun <T : Any> KtNDArray<T>.repeat(repeats: Int, axis: Int? = null): KtNDArray<T> (source)

Repeat elements of an array.

Parameters

repeats - The number of repetitions for each element.

axis - The axis along which to repeat values. By default, use the flattened input array, and return a flat output array.

Return
KtNDArray. Output array which has the same shape as input array, except along the given axis.

fun <T : Any> KtNDArray<T>.repeat(repeats: IntArray, axis: Int? = null): KtNDArray<T> (source)