scan

arrayfire.scan(array: Array, /, keys: None | Array = None, axis: int = 0, op: BinaryOperator = BinaryOperator.ADD, inclusive_scan: bool = True) Array

Perform a generalized scan of an array, optionally with a key.

Parameters

arrayaf.Array

Multi-dimensional ArrayFire array.

keysaf.Array, optional, default: None

Keys array for generalized scan. If None, a standard scan is performed.

axisint, optional, default: 0

Dimension along which the scan is performed.

opaf.BINARYOP, optional, default: af.BINARYOP.ADD

Binary operation that the scan algorithm uses. Can be one of: - af.BINARYOP.ADD - af.BINARYOP.MUL - af.BINARYOP.MIN - af.BINARYOP.MAX

inclusive_scanbool, optional, default: True

Specifies if the scan is inclusive.

Returns

outaf.Array

Array containing the result of the generalized scan.