From: Olivier Guilyardi Date: Wed, 17 Feb 2010 23:20:29 +0000 (+0000) Subject: rely on ndarray.ndim for decoder reshaping X-Git-Tag: 0.3.2~193 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=92d638004921322e73b421ad23704da935cb84e3;p=timeside.git rely on ndarray.ndim for decoder reshaping --- diff --git a/tests/api/examples.py b/tests/api/examples.py index ae1a64a..5d8fe7c 100644 --- a/tests/api/examples.py +++ b/tests/api/examples.py @@ -93,7 +93,7 @@ class FileDecoder(Processor): self.position += toread # audiolab returns a 1D array for 1 channel, need to reshape to 2D: - if self.file.channels == 1: + if frames.ndim == 1: frames = frames.reshape(len(frames), 1) return frames, eod