8000 DOC: Mention '1.25' legacy printing mode in ``set_printoptions`` · charris/numpy@fd714ab · GitHub
[go: up one dir, main page]

Skip to content

Commit fd714ab

Browse files
sebergcharris
authored andcommitted
DOC: Mention '1.25' legacy printing mode in set_printoptions
Mention the new printing mode in ``set_printoptions`` and copy the doc also to the duplication in ``array2string``. Closes numpygh-26731
1 parent 57a7919 commit fd714ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

numpy/_core/arrayprint.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,18 @@ def set_printoptions(precision=None, threshold=None, edgeitems=None,
217217
by not inserting spaces after commas that separate fields and after
218218
colons.
219219
220+
If set to ``'1.25'`` approximates printing of 1.25 which mainly means
221+
that numeric scalars are printed without their type information, e.g.
222+
as ``3.0`` rather than ``np.float64(3.0)``.
223+
220224
If set to `False`, disables legacy mode.
221225
222226
Unrecognized strings will be ignored with a warning for forward
223227
compatibility.
224228
225229
.. versionadded:: 1.14.0
226230
.. versionchanged:: 1.22.0
231+
.. versionchanged:: 2.0
227232
228233
See Also
229234
--------

0 commit comments

Comments
 (0)
0