Table of Contents

Class PrintOptions

Namespace
NumSharp.Backends.Printing
Assembly
NumSharp.dll

Mirror of NumPy's print options (the format_options context in numpy/_core/printoptions.py). Controls how an NDArray is rendered by array2string / array_str / array_repr and therefore by ToString().

public sealed class PrintOptions
Inheritance
PrintOptions
Inherited Members
Extension Methods

Remarks

The defaults match NumPy 2.4.2 exactly. Note that the runtime default floatmode is "maxprec" — the value documented as "maxprec_equal" in set_printoptions is outdated.

Fields

edgeitems

Number of array items in summary at beginning and end of each dimension (default 3).

public int edgeitems

Field Value

int

floatmode

Controls the interpretation of precision: fixed, unique, maxprec, maxprec_equal (default maxprec).

public string floatmode

Field Value

string

infstr

String representation of floating point infinity (default "inf").

public string infstr

Field Value

string

legacy

Legacy print mode as an int. MaxValue (sys.maxsize) means no legacy mode.

public long legacy

Field Value

long

linewidth

Number of characters per line for inserting line breaks (default 75).

public int linewidth

Field Value

int

nanstr

String representation of floating point not-a-number (default "nan").

public string nanstr

Field Value

string

precision

Number of digits of precision for floating point output (default 8).

public int precision

Field Value

int

sign

Controls printing of the sign of floating-point types: '-', '+', or ' ' (default '-').

public char sign

Field Value

char

suppress

If true, always print floating point numbers using fixed point notation (default false).

public bool suppress

Field Value

bool

threshold

Total number of array elements which trigger summarization (default 1000).

public int threshold

Field Value

int