Table of Contents

Struct NDEvaluateOptions

Namespace
NumSharp.Backends.Iteration
Assembly
NumSharp.dll

The resolved np.evaluate keyword bundle (where= / dtype= / casting= / order=) that DefaultEngine's Evaluate builds from the raw keywords (Evaluate(NDExpr, NDArray[], NDArray, NDArray, DType, string, char), the np-layer dtype plan's D11) and threads down its internal paths, so they gain ONE parameter instead of four and every future keyword rides the same struct. Public as the parameter type of Evaluate(NDExprProgram, NDArray[], NDArray, in NDEvaluateOptions) only: its members stay internal, so outside NumSharp.dll it is an opaque bundle to pass on (default = no keyword override).

public readonly struct NDEvaluateOptions
Inherited Members

Remarks

The struct is deliberately built so that default(NDEvaluateOptions) reproduces np.evaluate's pre-4.5 behaviour EXACTLY — no result cast, a same_kind out= rule, and today's 'K' layout heuristic. That is why the private fields are a NULLABLE casting (raw default(NPY_CASTING) is NPY_NO_CASTING, the wrong default) and a NUL order char rather than the enum/char values directly: every internal EvaluateCore call that materialises a sub-tree passes default and MUST see the natural dtype/layout, never a user override.

The engine member validates and RESOLVES each keyword before constructing this (a bad casting string or order char raises first), so the internal paths only ever see a legal, resolved bundle.