Package org.jetbrains.kotlinx.multik.api

Types

Link copied to clipboard
object DefaultEngineType : EngineType

Engine type for default implementation.

Link copied to clipboard
abstract class Engine

This class gives access to different implementations of LinAlg, Math, Statistics. When initializing Multik, it loads engines, by default DEFAULT implementation is used.

Link copied to clipboard
class EngineMultikException(message: String) : Exception
Link copied to clipboard
sealed class EngineType(val name: String)

Type engine implementations.

Link copied to clipboard
object KEEngineType : EngineType

Engine type for "pure kotlin" implementation.

Link copied to clipboard
typealias mk = Multik

Abbreviated name for Multik.

Link copied to clipboard
object Multik

The basic object through which calls all ndarray functions. Gives access to ndarray creation and interfaces Math, LinAlg and Statistics. Calling Multik will load the engine. The default is "DEFAULT". If no engine is found, then an exception is thrown only when you call an implementation that requires the engine.

Link copied to clipboard
object NativeEngineType : EngineType

Engine type for implementation with OpenBLAS.

Functions

Link copied to clipboard
inline fun <T : Number> Multik.arange(stop: Int, step: Double): D1Array<T>

Returns evenly spaced values within a given interval, where start of interval is 0 and the step is Double. see Multik.arange

inline fun <T : Number> Multik.arange(stop: Int, step: Int = 1): D1Array<T>

Returns evenly spaced values within a given interval, where start of interval is 0. see Multik.arange

inline fun <T : Number> Multik.arange(    start: Int,     stop: Int,     step: Double): D1Array<T>

Returns evenly spaced values within a given interval, where step is Double.

inline fun <T : Number> Multik.arange(    start: Int,     stop: Int,     step: Int = 1): D1Array<T>

Returns evenly spaced values within a given interval, where step is Integer.

Link copied to clipboard
inline fun <T : Any> Multik.d1array(sizeD1: Int, noinline init: (Int) -> T): D1Array<T>

Returns a 1-dimension array.

Link copied to clipboard
inline fun <T : Any> Multik.d2array(    sizeD1: Int,     sizeD2: Int,     noinline init: (Int) -> T): D2Array<T>

Creates a new array of the specified (sizeD1, sizeD2) shape, where each element is calculated by calling the specified init function.

Link copied to clipboard
inline fun <T : Any> Multik.d2arrayIndices(    sizeD1: Int,     sizeD2: Int,     init: (i: Int, j: Int) -> T): D2Array<T>

Creates a new 2-dimensions array of the specified (sizeD1, sizeD2) shape, where each element is calculated by calling the specified init function.

Link copied to clipboard
inline fun <T : Any> Multik.d3array(    sizeD1: Int,     sizeD2: Int,     sizeD3: Int,     noinline init: (Int) -> T): D3Array<T>

Creates a new 3-dimensions array of the specified (sizeD1, sizeD2, sizeD3) shape, where each element is calculated by calling the specified init function.

Link copied to clipboard
inline fun <T : Any> Multik.d3arrayIndices(    sizeD1: Int,     sizeD2: Int,     sizeD3: Int,     init: (i: Int, j: Int, k: Int) -> T): D3Array<T>

Creates a new 3-dimensions array of the specified (sizeD1, sizeD2, sizeD3) shape, where each element is calculated by calling the specified init function.

Link copied to clipboard
inline fun <T : Any> Multik.d4array(    sizeD1: Int,     sizeD2: Int,     sizeD3: Int,     sizeD4: Int,     noinline init: (Int) -> T): D4Array<T>

Creates a new 4-dimensions array of the specified (sizeD1, sizeD2, sizeD3, sizeD4) shape, where each element is calculated by calling the specified init function.

Link copied to clipboard
inline fun <T : Any> Multik.d4arrayIndices(    sizeD1: Int,     sizeD2: Int,     sizeD3: Int,     sizeD4: Int,     init: (i: Int, j: Int, k: Int, m: Int) -> T): D4Array<T>

Creates a new 4-dimensions array of the specified (sizeD1, sizeD2, sizeD3, sizeD4) shape, where each element is calculated by calling the specified init function.

Link copied to clipboard
inline fun <T : Any, D : Dimension> Multik.dnarray(shape: IntArray, noinline init: (Int) -> T): NDArray<T, D>

Returns a new array with the specified shape, where each element is calculated by calling the specified init function.

inline fun <T : Any> Multik.dnarray(    sizeD1: Int,     sizeD2: Int,     sizeD3: Int,     sizeD4: Int,     vararg dims: Int,     noinline init: (Int) -> T): NDArray<T, DN>

Creates a new 4-dimensions array of the specified (sizeD1, sizeD2, sizeD3, sizeD4, dims) shape, where each element is calculated by calling the specified init function.

Link copied to clipboard
inline fun <T : Any, D : Dimension> Multik.empty(vararg dims: Int): NDArray<T, D>

Returns a new zero array with the specified shape.

fun <T, D : Dimension> Multik.empty(dims: IntArray, dtype: DataType): NDArray<T, D>

Returns a new zero array of type dtype with the specified shape.

Link copied to clipboard
expect fun enginesProvider(): Map<EngineType, Engine>

Engine provider.

actual fun enginesProvider(): Map<EngineType, Engine>

Engine Provider for JS.

actual fun enginesProvider(): Map<EngineType, Engine>

Engine Provider for JVM.

actual fun enginesProvider(): Map<EngineType, Engine>

Engine Provider for Kotlin/Native targets.

Link copied to clipboard
inline fun <T : Any> Multik.identity(n: Int): D2Array<T>
fun <T> Multik.identity(n: Int, dtype: DataType): D2Array<T>

Returns the identity array.

Link copied to clipboard
inline fun <T : Number> Multik.linspace(    start: Double,     stop: Double,     num: Int = 50): D1Array<T>

Returns evenly spaced values within a given interval start, stop, where start and stop is Double.

inline fun <T : Number> Multik.linspace(    start: Int,     stop: Int,     num: Int = 50): D1Array<T>

Returns evenly spaced values within a given interval start, stop, more precisely than arange.

Link copied to clipboard
fun <T : Number> Multik.meshgrid(x: MultiArray<T, D1>, y: MultiArray<T, D1>): Pair<D2Array<T>, D2Array<T>>

Return coordinate matrices from coordinate vectors.

Link copied to clipboard
fun Multik.ndarray(args: Array<ByteArray>): D2Array<Byte>

Returns an D2Array from Array.

fun Multik.ndarray(args: Array<DoubleArray>): D2Array<Double>

Returns an D2Array from Array.

fun Multik.ndarray(args: Array<FloatArray>): D2Array<Float>

Returns an D2Array from Array.

fun Multik.ndarray(args: Array<IntArray>): D2Array<Int>

Returns an D2Array from Array.

fun Multik.ndarray(args: Array<LongArray>): D2Array<Long>

Returns an D2Array from Array.

fun Multik.ndarray(args: Array<ShortArray>): D2Array<Short>

Returns an D2Array from Array.

fun Multik.ndarray(args: ByteArray): D1Array<Byte>

Returns a new 1-dimension array from ByteArray.

fun Multik.ndarray(args: DoubleArray): D1Array<Double>

Returns a new 1-dimension array from DoubleArray.

fun Multik.ndarray(args: FloatArray): D1Array<Float>

Returns a new 1-dimension array from FloatArray.

fun Multik.ndarray(args: IntArray): D1Array<Int>

Returns a new 1-dimension array from IntArray.

fun Multik.ndarray(args: LongArray): D1Array<Long>

Returns a new 1-dimension array from LongArray.

fun Multik.ndarray(args: ShortArray): D1Array<Short>

Returns a new 1-dimension array from ShortArray.

fun <T : Number> Multik.ndarray(elements: Collection<T>): D1Array<T>
@JvmName(name = "ndarrayComplex")
fun <T : Complex> Multik.ndarray(elements: Collection<T>): D1Array<T>

Returns a new 1-dimension array given shape from a collection.

@JvmName(name = "ndarray1D")
inline fun <T : Number> Multik.ndarray(arg: List<T>): D1Array<T>

Creates the 1-dimension array from arg of Number type.

@JvmName(name = "ndarrayComplex1D")
inline fun <T : Complex> Multik.ndarray(arg: List<T>): D1Array<T>

Creates the 1-dimension array from arg of Complex type.

@JvmName(name = "ndarray2D")
inline fun <T : Number> Multik.ndarray(arg: List<List<T>>): D2Array<T>

Creates the 2-dimension array from arg of Number type.

@JvmName(name = "ndarrayComplex2D")
inline fun <T : Complex> Multik.ndarray(arg: List<List<T>>): D2Array<T>

Creates the 2-dimension array from arg of Complex type.

@JvmName(name = "ndarray3D")
inline fun <T : Number> Multik.ndarray(arg: List<List<List<T>>>): D3Array<T>

Creates the 3-dimension array from arg of Number type.

@JvmName(name = "ndarrayComplex3D")
inline fun <T : Complex> Multik.ndarray(arg: List<List<List<T>>>): D3Array<T>

Creates the 3-dimension array from arg of Complex type.

@JvmName(name = "ndarray4D")
inline fun <T : Number> Multik.ndarray(arg: List<List<List<List<T>>>>): D4Array<T>

Creates the 4-dimension array from arg of Number type.

@JvmName(name = "ndarrayComplex4D")
inline fun <T : Complex> Multik.ndarray(arg: List<List<List<List<T>>>>): D4Array<T>

Creates the 4-dimension array from arg of Complex type.

fun Multik.ndarray(args: ComplexDoubleArray): D1Array<ComplexDouble>

Returns a new 1-dimension array from ComplexDoubleArray.

fun Multik.ndarray(args: ComplexFloatArray): D1Array<ComplexFloat>

Returns a new 1-dimension array from ComplexFloatArray.

inline fun <T : Number, D : Dimension> Multik.ndarray(elements: Collection<T>, shape: IntArray): NDArray<T, D>
@JvmName(name = "ndarrayComplex")
inline fun <T : Complex, D : Dimension> Multik.ndarray(elements: Collection<T>, shape: IntArray): NDArray<T, D>

Returns a new array given shape from collection.

fun Multik.ndarray(    args: ByteArray,     dim1: Int,     dim2: Int): D2Array<Byte>

Returns a new 2-dimensions array from ByteArray.

fun Multik.ndarray(    args: DoubleArray,     dim1: Int,     dim2: Int): D2Array<Double>

Returns a new 2-dimensions array from DoubleArray.

fun Multik.ndarray(    args: FloatArray,     dim1: Int,     dim2: Int): D2Array<Float>

Returns a new 2-dimensions array from FloatArray.

fun Multik.ndarray(    args: IntArray,     dim1: Int,     dim2: Int): D2Array<Int>

Returns a new 2-dimensions array from IntArray.

fun Multik.ndarray(    args: LongArray,     dim1: Int,     dim2: Int): D2Array<Long>

Returns a new 2-dimensions array from LongArray.

fun Multik.ndarray(    args: ShortArray,     dim1: Int,     dim2: Int): D2Array<Short>

Returns a new 2-dimensions array from ShortArray.

fun <T : Number> Multik.ndarray(    elements: Collection<T>,     dim1: Int,     dim2: Int): D2Array<T>
@JvmName(name = "ndarrayComplex")
fun <T : Complex> Multik.ndarray(    elements: Collection<T>,     dim1: Int,     dim2: Int): D2Array<T>

Returns a new 2-dimensions array given shape from a collection.

fun <T : Number, D : Dimension> Multik.ndarray(    elements: Collection<T>,     shape: IntArray,     dim: D): NDArray<T, D>
@JvmName(name = "ndarrayComplex")
fun <T : Complex, D : Dimension> Multik.ndarray(    elements: Collection<T>,     shape: IntArray,     dim: D): NDArray<T, D>

Returns a new array given shape and dimension from collection.

fun Multik.ndarray(    args: ComplexDoubleArray,     dim1: Int,     dim2: Int): D2Array<ComplexDouble>

Returns a new 2-dimensions array from ComplexDoubleArray.

fun Multik.ndarray(    args: ComplexFloatArray,     dim1: Int,     dim2: Int): D2Array<ComplexFloat>

Returns a new 2-dimensions array from ComplexFloatArray.

fun Multik.ndarray(    args: ByteArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<Byte>

Returns a new 3-dimensions array from ByteArray.

fun Multik.ndarray(    args: DoubleArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<Double>

Returns a new 3-dimensions array from DoubleArray.

fun Multik.ndarray(    args: FloatArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<Float>

Returns a new 3-dimensions array from FloatArray.

fun Multik.ndarray(    args: IntArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<Int>

Returns a new 3-dimensions array from IntArray.

fun Multik.ndarray(    args: LongArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<Long>

Returns a new 3-dimensions array from LongArray.

fun Multik.ndarray(    args: ShortArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<Short>

Returns a new 3-dimensions array from ShortArray.

fun <T : Number> Multik.ndarray(    elements: Collection<T>,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<T>
@JvmName(name = "ndarrayComplex")
fun <T : Complex> Multik.ndarray(    elements: Collection<T>,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<T>

Returns a new 3-dimensions array given shape from a collection.

fun Multik.ndarray(    args: ComplexDoubleArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<ComplexDouble>

Returns a new 3-dimensions array from ComplexDoubleArray.

fun Multik.ndarray(    args: ComplexFloatArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<ComplexFloat>

Returns a new 3-dimensions array from ComplexFloatArray.

fun Multik.ndarray(    args: ByteArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<Byte>

Returns a new 4-dimensions array from ByteArray.

fun Multik.ndarray(    args: DoubleArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<Double>

Returns a new 4-dimensions array from DoubleArray.

fun Multik.ndarray(    args: FloatArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<Float>

Returns a new 4-dimensions array from FloatArray.

fun Multik.ndarray(    args: IntArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<Int>

Returns a new 4-dimensions array from IntArray.

fun Multik.ndarray(    args: LongArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<Long>

Returns a new 4-dimensions array from LongArray.

fun Multik.ndarray(    args: ShortArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<Short>

Returns a new 4-dimensions array from ShortArray.

fun <T : Number> Multik.ndarray(    elements: Collection<T>,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<T>
@JvmName(name = "ndarrayComplex")
fun <T : Complex> Multik.ndarray(    elements: Collection<T>,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<T>

Returns a new 4-dimensions array given shape from a collection.

fun Multik.ndarray(    args: ComplexDoubleArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<ComplexDouble>

Returns a new 4-dimensions array from ComplexDoubleArray.

fun Multik.ndarray(    args: ComplexFloatArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<ComplexFloat>

Returns a new 4-dimensions array from ComplexFloatArray.

fun Multik.ndarray(    args: ByteArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<Byte, DN>

Returns a new n-dimension array from ByteArray.

fun Multik.ndarray(    args: DoubleArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<Double, DN>

Returns a new n-dimension array from DoubleArray.

fun Multik.ndarray(    args: FloatArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<Float, DN>

Returns a new n-dimension array from FloatArray.

fun Multik.ndarray(    args: IntArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<Int, DN>

Returns a new n-dimension array from IntArray.

fun Multik.ndarray(    args: LongArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<Long, DN>

Returns a new n-dimension array from LongArray.

fun Multik.ndarray(    args: ShortArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<Short, DN>

Returns a new n-dimension array from ShortArray.

fun <T : Number> Multik.ndarray(    elements: Collection<T>,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<T, DN>
@JvmName(name = "ndarrayComplex")
fun <T : Complex> Multik.ndarray(    elements: Collection<T>,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<T, DN>

Returns a new n-dimension array given shape from a collection.

fun Multik.ndarray(    args: ComplexDoubleArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<ComplexDouble, DN>

Returns a new n-dimension array from ComplexDoubleArray.

fun Multik.ndarray(    args: ComplexFloatArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<ComplexFloat, DN>

Returns a new n-dimension array from ComplexFloatArray.

Link copied to clipboard
fun Multik.ndarrayOf(vararg items: ComplexDouble): D1Array<ComplexDouble>
fun Multik.ndarrayOf(vararg items: ComplexFloat): D1Array<ComplexFloat>
fun Multik.ndarrayOf(vararg items: Byte): D1Array<Byte>
fun Multik.ndarrayOf(vararg items: Double): D1Array<Double>
fun Multik.ndarrayOf(vararg items: Float): D1Array<Float>
fun Multik.ndarrayOf(vararg items: Int): D1Array<Int>
fun Multik.ndarrayOf(vararg items: Long): D1Array<Long>
fun Multik.ndarrayOf(vararg items: Short): D1Array<Short>

Returns a new 1-dimension array from items.

Link copied to clipboard
inline fun <T : Any> Multik.ones(dim1: Int): D1Array<T>

Returns a new ones array of 1 dim of type T with dim1 size.

inline fun <T : Any> Multik.ones(dim1: Int, dim2: Int): D2Array<T>

Returns a new ones array of 2 dim of type T with (dim1, dim2) shape.

fun <T, D : Dimension> Multik.ones(dims: IntArray, dtype: DataType): NDArray<T, D>

Returns a new ones array of N dim of type T with specify shape.

inline fun <T : Any> Multik.ones(    dim1: Int,     dim2: Int,     dim3: Int): D3Array<T>

Returns a new ones array of 3 dim of type T with (dim1, dim2, dim3) shape.

inline fun <T : Any> Multik.ones(    dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<T>

Returns a new ones array of 4 dim of type T with (dim1, dim2, dim3, dim4) shape.

inline fun <T : Any> Multik.ones(    dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<T, DN>

Returns a new ones array of N dim of type T with (dim1, dim2, dim3, dim4, dims) shape.

Link copied to clipboard
inline fun <T : Number> Multik.rand(dim0: Int): D1Array<T>

Returns a vector of the specified size filled with random numbers uniformly distributed for: Int - [Int.MIN_VALUE, Int.MAX_VALUE) Long - [Long.MIN_VALUE, Long.MAX_VALUE) Float - [0f, 1f) Double - [0.0, 1.0)

inline fun <T : Number, D : Dimension> Multik.rand(shape: IntArray): NDArray<T, D>
inline fun <T : Number> Multik.rand(    dim0: Int,     dim1: Int,     dim2: Int): D3Array<T>
inline fun <T : Number> Multik.rand(    dim0: Int,     dim1: Int,     dim2: Int,     dim3: Int): D4Array<T>
inline fun <T : Number> Multik.rand(    dim0: Int,     dim1: Int,     dim2: Int,     dim3: Int,     vararg dims: Int): NDArray<T, DN>

Returns an NDArray of the specified shape filled with random numbers uniformly distributed for: Int - [Int.MIN_VALUE, Int.MAX_VALUE) Long - [Long.MIN_VALUE, Long.MAX_VALUE) Float - [0f, 1f) Double - [0.0, 1.0)

inline fun <T : Number> Multik.rand(dim0: Int, dim1: Int): D2Array<T>

Returns a matrix of the specified shape filled with random numbers uniformly distributed for: Int - [Int.MIN_VALUE, Int.MAX_VALUE) Long - [Long.MIN_VALUE, Long.MAX_VALUE) Float - [0f, 1f) Double - [0.0, 1.0)

@JvmName(name = "randWithVarArg")
inline fun <T : Number, D : Dimension> Multik.rand(    from: T,     until: T,     vararg dims: Int): NDArray<T, D>
@JvmName(name = "randWithShape")
inline fun <T : Number, D : Dimension> Multik.rand(    from: T,     until: T,     dims: IntArray): NDArray<T, D>

Returns an NDArray of the specified shape filled with number uniformly distributed between [from, until)

@JvmName(name = "randSeedVarArg")
inline fun <T : Number, D : Dimension> Multik.rand(    seed: Int,     from: T,     until: T,     vararg dims: Int): NDArray<T, D>
@JvmName(name = "randSeedShape")
inline fun <T : Number, D : Dimension> Multik.rand(    seed: Int,     from: T,     until: T,     dims: IntArray): NDArray<T, D>

Returns an NDArray of the specified shape filled with number uniformly distributed between [from, until) with the specified seed.

@JvmName(name = "randGenVarArg")
inline fun <T : Number, D : Dimension> Multik.rand(    gen: Random,     from: T,     until: T,     vararg dims: Int): NDArray<T, D>
@JvmName(name = "randGenShape")
inline fun <T : Number, D : Dimension> Multik.rand(    gen: Random,     from: T,     until: T,     dims: IntArray): NDArray<T, D>

Returns an NDArray of the specified shape filled with number uniformly distributed between [from, until) with the specified gen.

Link copied to clipboard
fun Array<ByteArray>.toNDArray(): D2Array<Byte>
fun Array<DoubleArray>.toNDArray(): D2Array<Double>
fun Array<FloatArray>.toNDArray(): D2Array<Float>
fun Array<IntArray>.toNDArray(): D2Array<Int>
fun Array<LongArray>.toNDArray(): D2Array<Long>
fun Array<ShortArray>.toNDArray(): D2Array<Short>

Returns an D2Array.

inline fun <T : Number> Iterable<T>.toNDArray(): D1Array<T>
@JvmName(name = "toComplexNDArray")
inline fun <T : Complex> Iterable<T>.toNDArray(): D1Array<T>

Returns D1Array containing all elements.

@JvmName(name = "List2DToNDArrayNumber")
inline fun <T : Number> List<List<T>>.toNDArray(): D2Array<T>
@JvmName(name = "List2DToNDArrayComplex")
inline fun <T : Complex> List<List<T>>.toNDArray(): D2Array<T>

Returns D2Array containing all elements.

@JvmName(name = "List3DToNDArrayNumber")
inline fun <T : Number> List<List<List<T>>>.toNDArray(): D3Array<T>
@JvmName(name = "List3DToNDArrayComplex")
inline fun <T : Complex> List<List<List<T>>>.toNDArray(): D3Array<T>

Returns D3Array containing all elements.

@JvmName(name = "List4DToNDArrayNumber")
inline fun <T : Number> List<List<List<List<T>>>>.toNDArray(): D4Array<T>
@JvmName(name = "List4DToNDArrayComplex")
inline fun <T : Complex> List<List<List<List<T>>>>.toNDArray(): D4Array<T>

Returns D4Array containing all elements.

Link copied to clipboard
inline fun <T : Any> Multik.zeros(dim1: Int): D1Array<T>

Returns a new zero array of 1 dim of type T with dim1 size.

inline fun <T : Any> Multik.zeros(dim1: Int, dim2: Int): D2Array<T>

Returns a new zero array of 2 dim of type T with (dim1, dim2) shape.

fun <T, D : Dimension> Multik.zeros(dims: IntArray, dtype: DataType): NDArray<T, D>

Returns a new zero array of type T with specify shape.

inline fun <T : Any> Multik.zeros(    dim1: Int,     dim2: Int,     dim3: Int): D3Array<T>

Returns a new zero array of 3 dim of type T with (dim1, dim2, dim3) shape.

inline fun <T : Any> Multik.zeros(    dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<T>

Returns a new zero array of 4 dim of type T with (dim1, dim2, dim3, dim4) shape.

inline fun <T : Any> Multik.zeros(    dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<T, DN>

Returns a new zero array of N dim of type T with (dim1, dim2, dim3, dim4, dims) shape.

Properties

Link copied to clipboard
val engines: MutableMap<EngineType, Engine>

Saves and initialize engine.

Link copied to clipboard
val enginesStore: MutableMap<EngineType, Engine>

Saves and initialize engine.