Companion

object Companion

Properties

Link copied to clipboard

Whether or not nan == nan for eq/neq.

Link copied to clipboard

The minimum size of a flat array to use SIMD operations. Depends on the System, but usually 8 or 16.

Link copied to clipboard

The relative and absolute tolerance for eq/neq. This is implemented similar to numpy: absolute(a - b) <= (atol + rtol * absolute(b))

Functions

Link copied to clipboard
fun concat(first: F64Array, vararg rest: F64Array, axis: Int = 0): F64Array

Concatenates the given arrays along the specified axis.

Link copied to clipboard

Creates a 2D diagonal matrix from the given values.

Link copied to clipboard

Reads a CSV file into an F64Array.

fun F64Array.Companion.fromCSV(csv: <Error class: unknown class>, separator: String = ","): F64Array

Reads a CSV file into an F64Array.

Link copied to clipboard

Reads a BufferedImage into an F64Array.

Reads a BufferedImage into an F64Array.

fun F64Array.Companion.fromImage(file: <Error class: unknown class>): F64ImageArray

Reads an image file into an F64Array.

Link copied to clipboard
fun full(vararg shape: Int, init: Double): F64Array
fun full(rows: Int, cols: Int, init: Double): F64TwoAxisArray

Creates a new array with the given shape, filled with the given value.

Link copied to clipboard

Creates a 2D identity matrix of the given size.

Link copied to clipboard
@JvmName(name = "create")
operator fun invoke(vararg shape: Int): F64Array
@JvmName(name = "create")
operator fun invoke(rows: Int, cols: Int): F64TwoAxisArray

Creates a new array with the specified shape.

@JvmName(name = "create1D")
operator fun invoke(size: Int, init: (Int) -> Double): F64FlatArray

Creates a new flat array with the specified size and initializes it with the given function.

@JvmName(name = "create2D")
operator fun invoke(numRows: Int, numColumns: Int, init: (Int, Int) -> Double): F64TwoAxisArray

Creates a new 2D array with the specified shape and initializes it with the given function.

@JvmName(name = "create3D")
operator fun invoke(x: Int, y: Int, z: Int, init: (Int, Int, Int) -> Double): F64Array

Creates a new 3D array with the specified shape and initializes it with the given function.

Link copied to clipboard
fun linear(start: Double, stop: Double, num: Int = 50): F64FlatArray

Creates an array with a linear range of values.

Link copied to clipboard
fun of(vararg values: Double): F64FlatArray
@JvmName(name = "ofArray")
fun of(data: DoubleArray): F64FlatArray

Creates a new flat array from the given values.

Link copied to clipboard
@JvmName(name = "ofRowsArray")
fun ofRows(rows: List<F64Array>): F64TwoAxisArray

Creates a new array from the given list of rows.

Link copied to clipboard
fun ones(vararg shape: Int): F64Array
fun ones(rows: Int, cols: Int): F64TwoAxisArray

Creates a new array with the given shape, filled with ones.

Link copied to clipboard
fun random(vararg shape: Int, random: Random = Random): F64Array
fun random(rows: Int, cols: Int, random: Random = Random): F64TwoAxisArray

Creates an array of the given shape with random values. The values are uniformly distributed between 0 (inclusive) and 1 (exclusive).

Link copied to clipboard
fun zeros(vararg shape: Int): F64Array

Creates a new array with the given shape, filled with zeros.