From 6ed88af3e2c2c7cc3508a3f239c05b814837b989 Mon Sep 17 00:00:00 2001 From: Thijs Hekman Date: Tue, 11 Oct 2022 10:50:45 +0200 Subject: [PATCH] Fixed assert in octave filter --- src/lasp/lasp_octavefilter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lasp/lasp_octavefilter.py b/src/lasp/lasp_octavefilter.py index 56f1e89..fdcb39e 100644 --- a/src/lasp/lasp_octavefilter.py +++ b/src/lasp/lasp_octavefilter.py @@ -33,8 +33,10 @@ class OverallFilterBank: """ Filter input data """ - assert data.ndim == 2 - assert data.shape[1] == 1, "invalid number of channels, should be 1" + if data.ndim == 1: + data = data[:, None] + elif data.ndim == 2: + assert data.shape[1] == 1, "invalid number of channels, should be 1" if data.shape[0] == 0: return {}