Multik

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.

Note: Through Multik, you can set your own interface implementation.

Functions

Link copied to clipboard
fun addEngine(type: EngineType)

Adds engine to engines.

Link copied to clipboard
operator fun <T> get(vararg elements: T): List<T>

Returns a list of elements. Sugar for easy array creation.

Link copied to clipboard
fun setEngine(type: EngineType)

Sets the engine of type type as the current implementation.

Properties

Link copied to clipboard
val engine: String?

currently used engine.

Link copied to clipboard
val engines: Map<String, EngineType>

list of engines.

Link copied to clipboard
val linalg: LinAlg

returns the LinAlg implementation of the corresponding engine.

Link copied to clipboard
val math: Math

returns the Math implementation of the corresponding engine.

Link copied to clipboard
val stat: Statistics

returns the Statistics implementation of the corresponding engine.

Extensions

Link copied to clipboard
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.

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(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(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

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> 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.

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.

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
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: Int,     stop: Int,     num: Int = 50): D1Array<T>

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

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.

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
@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.

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 <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 <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.

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

Returns a new 1-dimension array from ByteArray.

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

Returns a new 1-dimension array from ShortArray.

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: FloatArray): D1Array<Float>

Returns a new 1-dimension array from FloatArray.

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

Returns a new 1-dimension array from DoubleArray.

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

Returns a new 1-dimension array from ComplexFloatArray.

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

Returns a new 1-dimension array from ComplexDoubleArray.

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 Multik.ndarray(    args: ByteArray,     dim1: Int,     dim2: Int): D2Array<Byte>

Returns a new 2-dimensions array from ByteArray.

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

Returns a new 2-dimensions array from ShortArray.

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: FloatArray,     dim1: Int,     dim2: Int): D2Array<Float>

Returns a new 2-dimensions array from FloatArray.

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

Returns a new 2-dimensions array from DoubleArray.

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

Returns a new 2-dimensions array from ComplexFloatArray.

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

Returns a new 2-dimensions array from ComplexDoubleArray.

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: ByteArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<Byte>

Returns a new 3-dimensions array from ByteArray.

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

Returns a new 3-dimensions array from ShortArray.

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: FloatArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<Float>

Returns a new 3-dimensions array from FloatArray.

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: ComplexFloatArray,     dim1: Int,     dim2: Int,     dim3: Int): D3Array<ComplexFloat>

Returns a new 3-dimensions array from ComplexFloatArray.

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

Returns a new 3-dimensions array from ComplexDoubleArray.

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: ByteArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<Byte>

Returns a new 4-dimensions array from ByteArray.

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

Returns a new 4-dimensions array from ShortArray.

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: FloatArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<Float>

Returns a new 4-dimensions array from FloatArray.

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: ComplexFloatArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int): D4Array<ComplexFloat>

Returns a new 4-dimensions array from ComplexFloatArray.

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

Returns a new 4-dimensions array from ComplexDoubleArray.

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: 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: ShortArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<Short, DN>

Returns a new n-dimension array from ShortArray.

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: 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: 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: ComplexFloatArray,     dim1: Int,     dim2: Int,     dim3: Int,     dim4: Int,     vararg dims: Int): NDArray<ComplexFloat, DN>

Returns a new n-dimension array from ComplexFloatArray.

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: Array<ByteArray>): D2Array<Byte>

Returns an D2Array from Array.

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

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<FloatArray>): D2Array<Float>

Returns an D2Array from Array.

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

Returns an D2Array from Array.

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

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.

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.

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.

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> 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)

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>
inline fun <T : Number, D : Dimension> Multik.rand(shape: IntArray): NDArray<T, D>

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)

@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
inline fun <T : Any, D : Dim2> Multik.read(    fileName: String,     delimiter: Char = ',',     charset: Charset = Charsets.UTF_8): NDArray<T, D>
fun <T, D : Dim2> Multik.read(    fileName: String,     dtype: DataType,     dim: Dim2,     delimiter: Char = ',',     charset: Charset = Charsets.UTF_8): NDArray<T, D>
inline fun <T : Any, D : Dim2> Multik.read(    file: File,     delimiter: Char = ',',     charset: Charset = Charsets.UTF_8): NDArray<T, D>
fun <T, D : Dim2> Multik.read(    file: File,     dtype: DataType,     dim: Dim2,     delimiter: Char = ',',     charset: Charset = Charsets.UTF_8): NDArray<T, D>

Returns an NDArray of type T and D dimension read from csv file.

Link copied to clipboard
fun <T, D : Dim2> Multik.readDelim(    inStream: InputStream,     dtype: DataType?,     dim: Dim2?,     delimiter: Char = ',',     charset: Charset,     isCompressed: Boolean = false): NDArray<T, D>
fun <T, D : Dim2> Multik.readDelim(    reader: Reader,     format: CSVFormat = CSVFormat.DEFAULT,     dtype: DataType?,     dim: Dim2?): NDArray<T, D>

Returns an NDArray of type T and D dimension read from csv file.

Link copied to clipboard
fun Multik.readRaw(    fileName: String,     dtype: DataType? = null,     dim: Dim2? = null,     delimiter: Char = ',',     charset: Charset = Charsets.UTF_8): NDArray<*, D2>
fun Multik.readRaw(    file: File,     dtype: DataType? = null,     dim: Dim2? = null,     delimiter: Char = ',',     charset: Charset = Charsets.UTF_8): NDArray<*, D2>

Returns a raw array of dimension 2. The type casts to either Double or ComplexDouble.

Link copied to clipboard
@JvmName(name = "stackD1")
fun <T> Multik.stack(vararg arr: MultiArray<T, D1>, axis: Int = 0): NDArray<T, D2>
@JvmName(name = "stackD1")
fun <T> Multik.stack(arrays: List<MultiArray<T, D1>>, axis: Int = 0): NDArray<T, D2>
@JvmName(name = "stackD2")
fun <T> Multik.stack(vararg arr: MultiArray<T, D2>, axis: Int = 0): NDArray<T, D3>
@JvmName(name = "stackD2")
fun <T> Multik.stack(arrays: List<MultiArray<T, D2>>, axis: Int = 0): NDArray<T, D3>
@JvmName(name = "stackD3")
fun <T> Multik.stack(vararg arr: MultiArray<T, D3>, axis: Int = 0): NDArray<T, D4>
@JvmName(name = "stackD3")
fun <T> Multik.stack(arrays: List<MultiArray<T, D3>>, axis: Int = 0): NDArray<T, D4>
@JvmName(name = "stackD4")
fun <T> Multik.stack(vararg arr: MultiArray<T, D4>, axis: Int = 0): NDArray<T, DN>
@JvmName(name = "stackD4")
fun <T> Multik.stack(arrays: List<MultiArray<T, D4>>, axis: Int = 0): NDArray<T, DN>
Link copied to clipboard
fun <T, D : Dim2> Multik.write(    file: File,     ndarray: NDArray<T, D>,     delimiter: Char = ',')
fun <T, D : Dim2> Multik.write(    path: String,     ndarray: NDArray<T, D>,     delimiter: Char = ',')

Writes an NDArray to csv file. The NDArray must be up to the second dimension.

Link copied to clipboard
fun <T, D : Dim2> Multik.writeCSV(    writer: Appendable,     ndarray: NDArray<T, D>,     format: CSVFormat = CSVFormat.DEFAULT)

Returns an NDArray of type T and D dimension read from csv file.

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.

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.

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

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