Package org.jetbrains.kotlinx.multik.api.io

Functions

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

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

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

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

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