You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / get_printoptions

function

numpy:get_printoptions

source: /numpy/_core/arrayprint.py :335

Signature

def   get_printoptions ( )

Summary

Return the current print options.

Returns

print_opts : dict

Dictionary of current print options with keys

  • precisionint

  • thresholdint

  • edgeitemsint

  • linewidthint

  • suppressbool

  • nanstrstr

  • infstrstr

  • signstr

  • formatterdict of callables

  • floatmodestr

  • legacystr or False

For a full description of these options, see set_printoptions.

Notes

These print options apply only to NumPy ndarrays, not to scalars.

Concurrency note: see text_formatting_options

Examples

import numpy as np
np.get_printoptions()
np.get_printoptions()['linewidth']
np.set_printoptions(linewidth=100)
np.get_printoptions()['linewidth']

See also

printoptions
set_printoptions

Aliases

  • numpy.get_printoptions

Referenced by