diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-06-23 08:45:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-23 08:45:11 +0300 |
commit | ccd206e30ca798ae5dafa70e1f7ab240f3b75424 (patch) | |
tree | bc8226674b3057f1d9b71f79a2ecd65aaf4c0ca4 | |
parent | d037f06c85bf15140084e537d12d6cf9c5cf4fa2 (diff) | |
parent | 069362a4eec5d7189a67e857351d377f7b3da761 (diff) | |
download | numpy-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.py | 11 |
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 ------- |