F64FlatArray

A 1D specialization type for F64Array.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val data: DoubleArray

The underlying data of the array. This should not typically be accessed directly.

Link copied to clipboard

A wrapper for image operations. The receiver array must have shape [width, height, channels] where channels is 3 or 4.

Link copied to clipboard
open override val isFlattenable: Boolean
Link copied to clipboard
open val length: Int

The length of the array in the first dimension.

Link copied to clipboard
open val nDim: Int

The number of dimensions of the array.

Link copied to clipboard
abstract val offset: Int

The offset into the data array where the array starts.

Link copied to clipboard
abstract val shape: IntArray

The shape of the array.

Link copied to clipboard
abstract val strides: IntArray

The strides of the array.

Link copied to clipboard
abstract val unrollDim: Int

The unrolling dimension of the array.

Link copied to clipboard
abstract val unrollSize: Int

The size of the unrolling dimension.

Link copied to clipboard
abstract val unrollStride: Int

The stride of the unrolling dimension.

Link copied to clipboard
abstract val V: Viewer

Returns an indexable viewer for the array to avoid chaining view calls.

Functions

Link copied to clipboard
open override fun abs(): F64FlatArray
Link copied to clipboard
open fun absInPlace()

Computes the absolute value of each element in the array in place.

Link copied to clipboard
open override fun acos(): F64FlatArray
Link copied to clipboard
open override fun acosh(): F64FlatArray
Link copied to clipboard
open fun acoshInPlace()

Computes the hyperbolic arccosine of each element in the array in place.

Link copied to clipboard
open fun acosInPlace()

Computes the arccosine of each element in the array in place.

Link copied to clipboard
open fun along(axis: Int): Sequence<F64Array>

Iterates over the array along the specified axis.

Link copied to clipboard
open infix override fun and(other: F64Array): F64FlatArray
open infix override fun and(other: Int): F64FlatArray
Link copied to clipboard
open fun andInPlace(other: F64Array)

Computes the bitwise and of each element in the array with another array in place. The values are first cast to integers before the operation.

open fun andInPlace(other: Int)

Computes the bitwise and of each element in the array with a scalar in place. The values are first cast to integers before the operation.

Link copied to clipboard
open fun argMax(): Int

Retrieves the index of the maximum value in the array.

Link copied to clipboard
open fun argMin(): Int

Retrieves the index of the minimum value in the array.

Link copied to clipboard
open override fun asin(): F64FlatArray
Link copied to clipboard
open override fun asinh(): F64FlatArray
Link copied to clipboard
open fun asinhInPlace()

Computes the hyperbolic arcsine of each element in the array in place.

Link copied to clipboard
open fun asinInPlace()

Computes the arcsine of each element in the array in place.

Link copied to clipboard
open override fun atan(): F64FlatArray
Link copied to clipboard
open override fun atan2(other: F64Array): F64FlatArray
Link copied to clipboard
open fun atan2InPlace(other: F64Array)

Computes the 2nd-argument arctangent of each element in the array in place.

Link copied to clipboard
open override fun atanh(): F64FlatArray
Link copied to clipboard
open fun atanhInPlace()

Computes the hyperbolic arctangent of each element in the array in place.

Link copied to clipboard
open fun atanInPlace()

Computes the arctangent of each element in the array in place.

Link copied to clipboard
open fun ceil(): F64Array

Computes the ceiling of each element in the array.

Link copied to clipboard
open fun ceilInPlace()

Computes the ceiling of each element in the array in place.

Link copied to clipboard
inline fun F64Array.checkAxis(axis: Int)

Checks if the axis is valid.

Link copied to clipboard
open override fun checkShape(other: F64Array): F64FlatArray
Link copied to clipboard
open override fun coerce(min: Double, max: Double): F64FlatArray
Link copied to clipboard
open fun coerceInPlace(min: Double, max: Double)

Coerces the array to the specified range in place.

Link copied to clipboard
abstract operator fun contains(other: Double): Boolean

Checks if the array contains the specified value.

Link copied to clipboard

Converts an HSV(A) image to RGB(A)

Link copied to clipboard

Converts an RGB(A) image to HSV(A)

Link copied to clipboard
abstract override fun copy(): F64FlatArray
Link copied to clipboard
open fun copyTo(other: F64Array)

Copies the array to another array.

Link copied to clipboard
open override fun cos(): F64FlatArray
Link copied to clipboard
open override fun cosh(): F64FlatArray
Link copied to clipboard
open fun coshInPlace()

Computes the hyperbolic cosine of each element in the array in place.

Link copied to clipboard

Calculates the cosine distance between this vector and some other vector.

Link copied to clipboard
open fun cosInPlace()

Computes the cosine of each element in the array in place.

Link copied to clipboard
open override fun cumSum(): F64FlatArray
Link copied to clipboard
open fun cumSumInPlace()

Calculates the cumulative sum of the array in place.

Link copied to clipboard
open operator override fun div(other: F64Array): F64FlatArray
open operator override fun div(other: Double): F64FlatArray
Link copied to clipboard
open operator fun divAssign(other: F64Array)

Divides this array by another array in place.

open operator fun divAssign(other: Double)

Divides each element in the array by a scalar in place.

Link copied to clipboard
open infix fun dot(other: F64Array): Double

Calculates the dot product of this array with another.

Link copied to clipboard
open infix override fun eq(other: F64Array): F64FlatArray
open infix override fun eq(other: Double): F64FlatArray
Link copied to clipboard
open fun eqInPlace(other: F64Array)

Compares if each element in the array is equal to another array in place.

open fun eqInPlace(other: Double)

Compares if each element in the array is equal to a scalar in place.

Link copied to clipboard
open override fun exp(): F64FlatArray
Link copied to clipboard
open override fun expBase(base: Double): F64FlatArray
Link copied to clipboard
open fun expBaseInPlace(base: Double)

Computes base^x for each element in the array in place.

Link copied to clipboard
open fun expInPlace()

Computes e^x for each element in the array in place.

Link copied to clipboard
open override fun expm1(): F64FlatArray
Link copied to clipboard
open fun expm1InPlace()

Computes e^x - 1 for each element in the array in place.

Link copied to clipboard

Performs a Real-to-Complex FFT on this array. The output array is NOT normalized.

Link copied to clipboard
open fun fill(value: Double)

Fills the array with the specified value.

Link copied to clipboard
open override fun flatten(): F64FlatArray
Link copied to clipboard
open fun floor(): F64Array

Computes the floor of each element in the array.

Link copied to clipboard
open fun floorInPlace()

Computes the floor of each element in the array in place.

Link copied to clipboard
abstract fun <T> fold(initial: T, operation: (acc: T, Double) -> T): T

Folds the array with an initial value and an operation.

Link copied to clipboard
abstract operator fun get(vararg indices: Int): Double

Indexing operators

abstract operator fun get(r: Int, c: Int): Double
abstract operator fun get(d: Int, r: Int, c: Int): Double

abstract operator fun get(pos: Int): Double

1D-specific Indexing operators

Link copied to clipboard
open infix override fun gt(other: F64Array): F64FlatArray
open infix override fun gt(other: Double): F64FlatArray
Link copied to clipboard
open infix override fun gte(other: F64Array): F64FlatArray
open infix override fun gte(other: Double): F64FlatArray
Link copied to clipboard
open fun gteInPlace(other: F64Array)

Compares if each element in the array is greater than or equal to another array in place.

open fun gteInPlace(other: Double)

Compares if each element in the array is greater than or equal to a scalar in place.

Link copied to clipboard
open fun gtInPlace(other: F64Array)

Compares if each element in the array is greater than another array in place.

open fun gtInPlace(other: Double)

Compares if each element in the array is greater than a scalar in place.

Link copied to clipboard
open override fun hypot(other: F64Array): F64FlatArray
Link copied to clipboard
open fun hypotInPlace(other: F64Array)

Computes the hypothenuse of each element in the array with another array in place.

Link copied to clipboard
open fun isFinite(): F64Array

Compares if each element in the array is finite.

Link copied to clipboard
open fun isFiniteInPlace()

Compares if each element in the array is finite in place.

Link copied to clipboard
open fun isInf(): F64Array

Compares if each element in the array is infinite.

Link copied to clipboard
open fun isInfInPlace()

Compares if each element in the array is infinite in place.

Link copied to clipboard
open fun isNan(): F64Array

Compares if each element in the array is NaN.

Link copied to clipboard
open fun isNanInPlace()

Compares if each element in the array is NaN in place.

Link copied to clipboard
open fun l1Distance(other: F64FlatArray): Double

Calculates the l1 (manhattan) distance between this vector and some other vector.

Link copied to clipboard
open fun l2Distance(other: F64FlatArray): Double

Calculates the l2 (euclidean) distance between this vector and some other vector.

Link copied to clipboard
open fun ln(): F64Array
Link copied to clipboard
open fun lnInPlace()
Link copied to clipboard
open override fun log(): F64FlatArray
Link copied to clipboard
open override fun log10(): F64FlatArray
Link copied to clipboard
open fun log10InPlace()

Computes log10(x) for each element in the array in place.

Link copied to clipboard
open override fun log1p(): F64FlatArray
Link copied to clipboard
open fun log1pInPlace()

Computes ln(1 + x) for each element in the array in place.

Link copied to clipboard
open override fun log2(): F64FlatArray
Link copied to clipboard
open fun log2InPlace()

Computes log2(x) for each element in the array in place.

Link copied to clipboard
open override fun logBase(base: Double): F64FlatArray
Link copied to clipboard
open fun logBaseInPlace(base: Double)

Computes log(x) / log(base) for each element in the array in place.

Link copied to clipboard
open fun logInPlace()

Computes ln(x) for each element in the array in place.

Link copied to clipboard
open infix override fun lt(other: F64Array): F64FlatArray
open infix override fun lt(other: Double): F64FlatArray
Link copied to clipboard
open infix override fun lte(other: F64Array): F64FlatArray
open infix override fun lte(other: Double): F64FlatArray
Link copied to clipboard
open fun lteInPlace(other: F64Array)

Compares if each element in the array is less than or equal to another array in place.

open fun lteInPlace(other: Double)

Compares if each element in the array is less than or equal to a scalar in place.

Link copied to clipboard
open fun ltInPlace(other: F64Array)

Compares if each element in the array is less than another array in place.

open fun ltInPlace(other: Double)

Compares if each element in the array is less than a scalar in place.

Link copied to clipboard
open fun <T> map(transform: (Double) -> T): Sequence<T>

Maps the array to a sequence with the given transform.

Link copied to clipboard
open fun max(): Double

Returns the maximum element in the array.

Link copied to clipboard
open fun mean(): Double

Returns the mean of all elements in the array.

Link copied to clipboard
open fun min(): Double

Returns the minimum element in the array.

Link copied to clipboard
open operator override fun minus(other: F64Array): F64FlatArray
open operator override fun minus(other: Double): F64FlatArray
Link copied to clipboard
open operator fun minusAssign(other: F64Array)

Subtracts another array from this array in place.

open operator fun minusAssign(other: Double)

Subtracts a scalar from each element in the array in place.

Link copied to clipboard
open infix override fun neq(other: F64Array): F64FlatArray
open infix override fun neq(other: Double): F64FlatArray
Link copied to clipboard
open fun neqInPlace(other: F64Array)

Compares if each element in the array is not equal to another array in place.

open fun neqInPlace(other: Double)

Compares if each element in the array is not equal to a scalar in place.

Link copied to clipboard
open fun norm(): Double

Calculates the norm of the array.

Link copied to clipboard
open override fun not(): F64FlatArray
Link copied to clipboard
open fun notInPlace()

Computes the bitwise not of each element in the array in place. The values are first cast to integers before the operation.

Link copied to clipboard
open infix override fun or(other: F64Array): F64FlatArray
open infix override fun or(other: Int): F64FlatArray
Link copied to clipboard
open fun orInPlace(other: F64Array)

Computes the bitwise or of each element in the array with another array in place. The values are first cast to integers before the operation.

open fun orInPlace(other: Int)

Computes the bitwise or of each element in the array with a scalar in place. The values are first cast to integers before the operation.

Link copied to clipboard
abstract infix fun outer(other: F64FlatArray): F64Array

Calculates the outer product of this array with another.

Link copied to clipboard
open operator override fun plus(other: F64Array): F64FlatArray
open operator override fun plus(other: Double): F64FlatArray
Link copied to clipboard
open operator fun plusAssign(other: F64Array)

Adds another array to this array in place.

open operator fun plusAssign(other: Double)

Adds a scalar to each element in the array in place.

Link copied to clipboard
open override fun pow(power: Double): F64FlatArray
Link copied to clipboard
open fun powInPlace(power: Double)

Computes x^power for each element in the array in place.

Link copied to clipboard
open fun product(): Double

Returns the product of all elements in the array.

Link copied to clipboard
abstract fun reduce(operation: (Double, Double) -> Double): Double

Reduces the array with an operation.

abstract fun reduce(axis: Int, operation: (Double, Double) -> Double): F64Array

Reduces the array with an operation along the given axis.

Link copied to clipboard
open operator override fun rem(other: F64Array): F64FlatArray
open operator override fun rem(other: Double): F64FlatArray
Link copied to clipboard
open operator fun remAssign(other: F64Array)

Divides this array by another array in plac and takes the remainder.

open operator fun remAssign(other: Double)

Divides each element with a scalar and takes the remainder.

Link copied to clipboard
open fun reorder(indices: IntArray, axis: Int = 0)

Reorders the array along the specified axis.

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

Reshapes the array to the specified shape.

Link copied to clipboard
open fun round(): F64Array

Rounds each element in the array.

Link copied to clipboard
open fun roundInPlace()

Rounds each element in the array in place.

Link copied to clipboard
abstract fun scan(operation: (Double, Double) -> Double)

Scans the array in-place with an operation. Scan is like reduce, but it saves the intermediate values. For example, cumsum might be implemented as scan(Double::plus)

abstract fun scan(axis: Int, operation: (Double, Double) -> Double)

Scans the array in-place with an operation along the given axis.

Link copied to clipboard
abstract operator fun set(vararg indices: Int, value: Double)
abstract operator fun set(r: Int, c: Int, value: Double)
abstract operator fun set(d: Int, r: Int, c: Int, value: Double)
abstract operator fun set(pos: Int, value: Double)
Link copied to clipboard
open infix override fun shl(other: F64Array): F64FlatArray
open infix override fun shl(other: Int): F64FlatArray
Link copied to clipboard
open fun shlInPlace(other: F64Array)

Shifts each element in the array to the left by the elements in another array in place. The values of both arrays are first cast to integers before the operation.

open fun shlInPlace(other: Int)

Shifts each element in the array to the left by a scalar in place. The values are first cast to integers before the operation.

Link copied to clipboard
open infix override fun shr(other: F64Array): F64FlatArray
open infix override fun shr(other: Int): F64FlatArray
Link copied to clipboard
open fun shrInPlace(other: F64Array)

Shifts each element in the array to the right by the elements in another array in place. The values of both arrays are first cast to integers before the operation.

open fun shrInPlace(other: Int)

Shifts each element in the array to the right by a scalar in place. The values are first cast to integers before the operation.

Link copied to clipboard
open override fun sin(): F64FlatArray
Link copied to clipboard
open override fun sinh(): F64FlatArray
Link copied to clipboard
open fun sinhInPlace()

Computes the hyperbolic sine of each element in the array in place.

Link copied to clipboard
open fun sinInPlace()

Computes the sine of each element in the array in place.

Link copied to clipboard
abstract override fun slice(from: Int, to: Int, step: Int, axis: Int): F64FlatArray
Link copied to clipboard
open override fun sqrt(): F64FlatArray
Link copied to clipboard
open fun sqrtInPlace()

Computes the square root of each element in the array in place.

Link copied to clipboard
open fun stdDev(): Double

Returns the standard deviation of all elements in the array.

Link copied to clipboard
open fun sum(): Double

Returns the sum of all elements in the array.

Link copied to clipboard
open override fun tan(): F64FlatArray
Link copied to clipboard
open override fun tanh(): F64FlatArray
Link copied to clipboard
open fun tanhInPlace()

Computes the hyperbolic tangent of each element in the array in place.

Link copied to clipboard
open fun tanInPlace()

Computes the tangent of each element in the array in place.

Link copied to clipboard
open operator override fun times(other: F64Array): F64FlatArray
open operator override fun times(other: Double): F64FlatArray
Link copied to clipboard
open operator fun timesAssign(other: F64Array)

Multiplies another array with this array in place. This is element-wise multiplication, not matrix multiplication.

open operator fun timesAssign(other: Double)

Multiplies each element in the array with a scalar in place.

Link copied to clipboard
fun F64Array.toCSV(separator: String = ","): Sequence<String>

Writes an F64Array to a CSV string.

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

Writes an F64Array to a CSV file.

Link copied to clipboard
fun F64FlatArray.toDataColumn(name: String): <Error class: unknown class><Double>

Converts an F64FlatArray to a DataColumn.

Link copied to clipboard
fun F64Array.toDJL(manager: <Error class: unknown class>? = null): <Error class: unknown class>

Converts an F64Array to a NDArray.

Link copied to clipboard

Returns the data from the array as a flat array.

Link copied to clipboard
fun F64FlatArray.toEmbedding(): <Error class: unknown class>

Converts an F64FlatArray to an Embedding.

Link copied to clipboard

Converts an F64Array to a FloatArray. Only supported on flat arrays.

Link copied to clipboard
fun F64Array.toImage(file: File)

Writes an F64Array to an image file.

Link copied to clipboard
fun F64Array.toOpenCVMat(type: Int = CvType.CV_64FC4): <Error class: unknown class>

Converts an F64Array to a Mat.

Link copied to clipboard
open fun toString(maxDisplay: Int): String
Link copied to clipboard
open override fun transform(transform: (Double) -> Double): F64FlatArray
Link copied to clipboard
abstract fun transformInPlace(transform: (Double) -> Double)

Transforms the array in place.

Link copied to clipboard
abstract fun transpose(ax1: Int = 0, ax2: Int = 1): F64Array

Transposes the array along the specified axes.

Link copied to clipboard
open fun trunc(): F64Array

Truncates each element in the array.

Link copied to clipboard
open fun truncInPlace()

Truncates each element in the array in place.

Link copied to clipboard
open operator override fun unaryMinus(): F64FlatArray
Link copied to clipboard

Negates each element in the array in place.

Link copied to clipboard
open operator override fun unaryPlus(): F64FlatArray
Link copied to clipboard
open fun variance(): Double

Returns the variance of all elements in the array.

Link copied to clipboard
open fun view(index: Int, axis: Int = 0): F64Array

Returns a view of the array along the specified axis.

Link copied to clipboard
open infix override fun xor(other: F64Array): F64FlatArray
open infix override fun xor(other: Int): F64FlatArray
Link copied to clipboard
open fun xorInPlace(other: F64Array)

Computes the bitwise xor of each element in the array with another array in place. The values are first cast to integers before the operation.

open fun xorInPlace(other: Int)

Computes the bitwise xor of each element in the array with a scalar in place. The values are first cast to integers before the operation.

Link copied to clipboard
open override fun zipTransform(other: F64Array, transform: (Double, Double) -> Double): F64FlatArray
Link copied to clipboard
abstract fun zipTransformInPlace(other: F64Array, transform: (Double, Double) -> Double)

Zips the array with another array and transforms it in place.