From 5e2bf1d3d225353b1a29779852964a1f03b7596f Mon Sep 17 00:00:00 2001 From: Walter Simson Date: Tue, 19 Dec 2023 11:57:44 -0800 Subject: [PATCH] try something for get_win --- kwave/utils/signals.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kwave/utils/signals.py b/kwave/utils/signals.py index 1066f878..0763b460 100644 --- a/kwave/utils/signals.py +++ b/kwave/utils/signals.py @@ -142,9 +142,10 @@ def cosine_series(n: int, N: int, coeffs: List[float]) -> np.ndarray: # create the window if N.size == 1: + # TODO: what should this behaviour be if N is a list of ints? make windows of multiple lengths? n = np.arange(0, N) - assert (N - 1) != 0, 'N must be greater than 1' + assert np.all(N - 1) != 0, 'N must be greater than 1' if type_ == 'Bartlett': win = (2 / (N - 1) * ((N - 1) / 2 - abs(n - (N - 1) / 2))).T