summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-06-23 08:45:11 +0300
committerGitHub <noreply@github.com>2019-06-23 08:45:11 +0300
commitccd206e30ca798ae5dafa70e1f7ab240f3b75424 (patch)
treebc8226674b3057f1d9b71f79a2ecd65aaf4c0ca4
parentd037f06c85bf15140084e537d12d6cf9c5cf4fa2 (diff)
parent069362a4eec5d7189a67e857351d377f7b3da761 (diff)
downloadnumpy-ccd206e30ca798ae5dafa70e1f7ab240f3b75424.tar.gz
Merge pull request #13795 from kianasun/fix-fromstring-doc
DOC: Update description of sep in fromstring
-rw-r--r--numpy/core/_add_newdocs.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index fafe29482..84339ef23 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -1041,9 +1041,14 @@ add_newdoc('numpy.core.multiarray', 'fromstring',
elements is also ignored.
.. deprecated:: 1.14
- If this argument is not provided, `fromstring` falls back on the
- behaviour of `frombuffer` after encoding unicode string inputs as
- either utf-8 (python 3), or the default encoding (python 2).
+ Passing ``sep=''``, the default, is deprecated since it will
+ trigger the deprecated binary mode of this function. This mode
+ interprets `string` as binary bytes, rather than ASCII text with
+ decimal numbers, an operation which is better spelt
+ ``frombuffer(string, dtype, count)``. If `string` contains unicode
+ text, the binary mode of `fromstring` will first encode it into
+ bytes using either utf-8 (python 3) or the default encoding
+ (python 2), neither of which produce sane results.
Returns
-------