Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Fix error reading from generators
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Jun 7, 2021
1 parent 7da82fe commit cd7af47
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.4
current_version = 0.2.5

[bumpversion:file:waves/__init__.py]

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = waves
version = 0.2.4
version = 0.2.5
description = Utility to work with WAV files in a simple way.
long_description = file: README.rst
long_description_content_type = text/x-rst
Expand Down
2 changes: 1 addition & 1 deletion waves/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
__all__ = ("Sound", "mono_ttf_gen", "stereo_ttf_gen")

__title__ = "waves"
__version__ = "0.2.4"
__version__ = "0.2.5"
5 changes: 4 additions & 1 deletion waves/sound/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,10 @@ def dataframes(self):
shape = (self.n_frames, self.n_channels)
_data = np.empty(shape, dtype=self.dtype)
for i, frame_data in enumerate(self._time_to_frame_generator()):
_data[i] = frame_data
try:
_data[i] = frame_data
except IndexError:
break
return _data
else:
return self._read_frames()
Expand Down

0 comments on commit cd7af47

Please sign in to comment.