diff options
author | Ben Nathanson <github@bigriver.xyz> | 2020-09-23 11:10:39 -0400 |
---|---|---|
committer | Ben Nathanson <github@bigriver.xyz> | 2020-09-23 11:10:39 -0400 |
commit | 2fe46b4d25788a43499893c968e114bfa9be8a10 (patch) | |
tree | 2f472daea872b2415c31837db3333963e062f261 /doc/source/user | |
parent | 9c799c4fd07c2b3d13c189fda5bee4d6b45e54bb (diff) | |
download | numpy-2fe46b4d25788a43499893c968e114bfa9be8a10.tar.gz |
DOC: Incorporate blob suggestions in PR #17353
Diffstat (limited to 'doc/source/user')
-rw-r--r-- | doc/source/user/how-to-io.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/source/user/how-to-io.rst b/doc/source/user/how-to-io.rst index f8b4dee9f..64096bfc2 100644 --- a/doc/source/user/how-to-io.rst +++ b/doc/source/user/how-to-io.rst @@ -236,13 +236,13 @@ The ``.wav`` file header as a NumPy structured dtype:: ("block_align", "<u2"),
("bits_per_sample", "<u2"),
("data_id", "S4"),
- ("data_size", "u4"),
+ ("data_size", "<u4"),
#
# the sound data itself cannot be represented here:
# it does not have a fixed size
- ])
+ ])
- data = np.fromfile(f,dtype=wave_header_dtype)
+ data = np.fromfile(f,dtype=wave_header_dtype,count=1)[0]
Credit: Pauli Virtanen, :ref:`advanced_numpy`.
|