MCPcopy Index your code
hub / github.com/numpy/numpy / _set_printoptions

Function _set_printoptions

numpy/_core/arrayprint.py:315–332  ·  view source on GitHub ↗
(precision=None, threshold=None, edgeitems=None,
                      linewidth=None, suppress=None, nanstr=None,
                      infstr=None, formatter=None, sign=None, floatmode=None,
                      *, legacy=None, override_repr=None)

Source from the content-addressed store, hash-verified

313
314
315def _set_printoptions(precision=None, threshold=None, edgeitems=None,
316 linewidth=None, suppress=None, nanstr=None,
317 infstr=None, formatter=None, sign=None, floatmode=None,
318 *, legacy=None, override_repr=None):
319 new_opt = _make_options_dict(precision, threshold, edgeitems, linewidth,
320 suppress, nanstr, infstr, sign, formatter,
321 floatmode, legacy)
322 # formatter and override_repr are always reset
323 new_opt['formatter'] = formatter
324 new_opt['override_repr'] = override_repr
325
326 updated_opt = format_options.get() | new_opt
327 updated_opt.update(new_opt)
328
329 if updated_opt['legacy'] == 113:
330 updated_opt['sign'] = '-'
331
332 return format_options.set(updated_opt)
333
334
335@set_module('numpy')

Callers 2

set_printoptionsFunction · 0.85
printoptionsFunction · 0.85

Calls 3

_make_options_dictFunction · 0.85
updateMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…