trait VisitorTrait (View source)

Visitor methods

Methods

walk(callable $func)

Walk on first dimension

walk_recursive(callable $func)

Walk on last dimension

int|float
iterate(RecursiveIteratorIterator $iterator)

Iterate on next value

int|NdArray
axis(callable $func, int|float $number = null, bool $keepdims = false)

Execute axis operations and return an aggregate

Details

final NdArray walk(callable $func)

Walk on first dimension

Parameters

callable $func

Return Value

NdArray

final NdArray walk_recursive(callable $func)

Walk on last dimension

Parameters

callable $func

Return Value

NdArray

final int|float iterate(RecursiveIteratorIterator $iterator)

Iterate on next value

Parameters

RecursiveIteratorIterator $iterator

Return Value

int|float

final int|NdArray axis(callable $func, int|float $number = null, bool $keepdims = false)

Execute axis operations and return an aggregate

Parameters

callable $func
int|float $number
bool $keepdims

Return Value

int|NdArray