scan

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)

Since

1.1.1

Parameters

operation

the operation


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

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

Scan is like reduce, but it saves the intermediate values. For example, cumsum might be implemented as scan(axis, Double::plus)

Since

1.1.1

Parameters

axis

the axis to scan along

operation

the operation