Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pysoundfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,9 @@ def __len__(self):
def __getitem__(self, frame):
# access the file as if it where a Numpy array. The data is
# returned as numpy array.
from warnings import warn
warn('indexing has been deprecated and will be removed in the future',
Warning)
second_frame = None
if isinstance(frame, tuple):
if len(frame) > 2:
Expand All @@ -776,6 +779,9 @@ def __setitem__(self, frame, data):
# access the file as if it where a one-dimensional Numpy
# array. Data must be in the form (frames x channels).
# Both open slice bounds and negative values are allowed.
from warnings import warn
warn('indexing has been deprecated and will be removed in the future',
Warning)
start, stop = self._get_slice_bounds(frame)
if stop - start != len(data):
raise IndexError(
Expand Down