From c84176ad394a40fdfa9d7831433d397805a1cf3a Mon Sep 17 00:00:00 2001 From: Alexander Harvey Nitz Date: Wed, 5 Aug 2026 18:09:33 -0400 Subject: [PATCH] Fix inverted nbatch/size check in FFT._check_fwd_args The forward-FFT argument check rejected the only valid way to request a batched transform (nbatch > 1 with an explicit size) while silently accepting the invalid nbatch > 1, size=None case. _check_inv_args already had the correct condition; batched forward FFTs via the class-based API just hadn't been exercised elsewhere in the codebase until now. --- pycbc/fft/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pycbc/fft/core.py b/pycbc/fft/core.py index 92e3cdcb229..3c15d5653a3 100644 --- a/pycbc/fft/core.py +++ b/pycbc/fft/core.py @@ -98,7 +98,7 @@ def _check_fwd_args(invec, itype, outvec, otype, nbatch, size): olen = len(outvec) if nbatch < 1: raise ValueError("nbatch must be >= 1") - if (nbatch > 1) and size is not None: + if (nbatch > 1) and size is None: raise ValueError("When nbatch > 1, size cannot be 'None'") if size is None: size = ilen