diff options
| author | Matti Picus <matti.picus@gmail.com> | 2022-07-17 08:12:36 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-17 08:12:36 +0300 |
| commit | 41b56579ee53ffb543a5fedef027cfa8ca4576a5 (patch) | |
| tree | e5e7be18def0fe3aced725d738b619b69ef7af9a /numpy | |
| parent | bdec32181605c8179fd79624d14c1cf019de75af (diff) | |
| parent | 91ab215ad2b6380bb7d93e43819958147d008a56 (diff) | |
| download | numpy-41b56579ee53ffb543a5fedef027cfa8ca4576a5.tar.gz | |
Merge pull request #21992 from noritada/crossreference-frombuffer-and-tobytes
DOC: cross-reference descriptions of frombuffer and ndarray.tobytes
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/_add_newdocs.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index f71136eef..50ec50d2d 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -1601,6 +1601,12 @@ add_newdoc('numpy.core.multiarray', 'frombuffer', ------- out : ndarray + See also + -------- + ndarray.tobytes + Inverse of this operation, construct Python bytes from the raw data + bytes in the array. + Notes ----- If the buffer has data that is not in machine byte-order, this should @@ -4458,6 +4464,12 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('tobytes', """ s : bytes Python bytes exhibiting a copy of `a`'s raw data. + See also + -------- + frombuffer + Inverse of this operation, construct a 1-dimensional array from Python + bytes. + Examples -------- >>> x = np.array([[0, 1], [2, 3]], dtype='<u2') |
