From 92d638004921322e73b421ad23704da935cb84e3 Mon Sep 17 00:00:00 2001 From: Olivier Guilyardi Date: Wed, 17 Feb 2010 23:20:29 +0000 Subject: [PATCH] rely on ndarray.ndim for decoder reshaping --- tests/api/examples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5