Table of Contents

Struct ComplexMinMaxAccumulator

Namespace
NumSharp.Backends.Iteration
Assembly
NumSharp.dll

Min/Max accumulator for Complex: the running lexicographic extremum, a "seen any value" flag, and a NaN flag. On the first element whose real OR imaginary part is NaN the kernel stores that element VERBATIM in Best and aborts — matching NumPy's minimum/maximum, which return the NaN-bearing operand as-is (e.g. min([1+1j, nan+0j]) → (nan,0), not (nan,nan)). Because the iterator runs in NPY_KEEPORDER, the element captured is the first NaN in MEMORY order, which is exactly what NumPy's reduce returns for a non-C-contiguous (e.g. transposed) array.

public struct ComplexMinMaxAccumulator
Inherited Members
Extension Methods

Fields

Best

public Complex Best

Field Value

Complex

SawNaN

public bool SawNaN

Field Value

bool

Seen

public bool Seen

Field Value

bool