8000 MAINT: respond to marten's comments · numpy/numpy@fe9add9 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe9add9

Browse files
committed
MAINT: respond to marten's comments
1 parent dfc28d9 commit fe9add9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

numpy/_core/arrayprint.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,13 @@ def set_printoptions(precision=None, threshold=None, edgeitems=None,
280280
281281
"""
282282
new_opt = _make_options_dict(precision, threshold, edgeitems, linewidth,
283-
suppress, nanstr, infstr, sign, formatter,
284-
floatmode, legacy)
285-
# formatter is always reset
283+
suppress, nanstr, infstr, sign, formatter,
284+
floatmode, legacy)
285+
# formatter and override_repr are always reset
286286
new_opt['formatter'] = formatter
287287
new_opt['override_repr'] = override_repr
288288

289-
updated_opt = format_options.get().copy()
289+
updated_opt = format_options.get() | new_opt
290290
updated_opt.update(new_opt)
291291

292292
if updated_opt['legacy'] == 113:
@@ -1450,8 +1450,7 @@ def _void_scalar_to_string(x, is_repr=True):
14501450
options = format_options.get().copy()
14511451

14521452
if options["legacy"] <= 125:
1453-
return StructuredVoidFormat.from_data(
1454-
array(x), **options)(x)
1453+
return StructuredVoidFormat.from_data(array(x), **options)(x)
14551454

14561455
if options.get('formatter') is None:
14571456
options['formatter'] = {}

0 commit comments

Comments
 (0)
0