diff options
author | Allan Haldane <allan.haldane@gmail.com> | 2017-09-19 14:34:38 -0400 |
---|---|---|
committer | Allan Haldane <allan.haldane@gmail.com> | 2017-09-25 21:23:02 -0400 |
commit | 710e0327687b9f7653e5ac02d222ba62c657a718 (patch) | |
tree | 5cb32e3c86a67dafe247df1f0aabf49ca291e236 /doc | |
parent | 6bfef271d8df4c5aa4af9075defd672b11f1cbc0 (diff) | |
download | numpy-710e0327687b9f7653e5ac02d222ba62c657a718.tar.gz |
MAINT: fixups to legacy spacing in FloatFormat
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/1.14.0-notes.rst | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/doc/release/1.14.0-notes.rst b/doc/release/1.14.0-notes.rst index e315d6f67..c9f1cec76 100644 --- a/doc/release/1.14.0-notes.rst +++ b/doc/release/1.14.0-notes.rst @@ -310,25 +310,15 @@ This option controls printing of the sign of floating-point types, and may be one of the characters '-', '+' or ' ', or the string 'legacy'. With '+' numpy always prints the sign of positive values, with ' ' it always prints a space (whitespace character) in the sign position of positive values, and with '-' it -will omit the sign character for positive values. The new default is '-'. +will omit the sign character for positive values, and with 'legacy' it will +behave like ' ' except no space is printed in 0d arrays. The new default is '-'. -Setting ``sign='legacy'`` will behave like ' ' except that no space is printed -in 0d arrays, and also includes a space before ``True`` values in size-1 bool -arrays. This approximates the behavior of numpy 1.13 and before. - -Unneeded whitespace in float and bool array printing removed ------------------------------------------------------------- +Unneeded whitespace in float array printing removed +--------------------------------------------------- The new default of ``sign='-'`` (see last note) means that the ``repr`` of float arrays now often omits the whitespace characters previously used to display the sign. This new behavior can be disabled to mostly reproduce numpy -1.13 behavior by calling: - - >>> np.set_printoptions(sign='legacy') - -Additionally, the ``repr`` of bool arrays with only one element now omits the -whitespace before a ``True`` value, so that ``repr(array([True]))`` now returns -``'array([True])'`` instead of ``'array([ True])'``. This is disabled by -setting ``sign='legacy'``. +1.13 behavior by calling ``np.set_printoptions(sign='legacy')``. ``threshold`` and ``edgeitems`` options added to ``np.array2string`` ----------------------------------------------------------------- |