bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / get_printoptions
function
numpy:get_printoptions
source: /dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/_core/arrayprint.py:332
Signature
def get_printoptions()Summary
Return the current print options.
Returns
print_opts: dictDictionary 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.
Examples
import numpy as np
✓np.get_printoptions()
✓{'edgeitems': 3, 'threshold': 1000, 'floatmode': 'maxprec', 'precision': 8, 'suppress': False, 'linewidth': 75, 'nanstr': 'nan', 'infstr': 'inf', 'sign': '-', 'formatter': None, 'legacy': False, 'override_repr': None}
np.get_printoptions()['linewidth'] np.set_printoptions(linewidth=100) np.get_printoptions()['linewidth']✓
100
See also
Aliases
numpy.get_printoptions