Skip to content

Fix inverted nbatch/size check in FFT._check_fwd_args - #5396

Open
ahnitz wants to merge 1 commit into
gwastro:masterfrom
ahnitz:pr-fft-nbatch-fix
Open

Fix inverted nbatch/size check in FFT._check_fwd_args#5396
ahnitz wants to merge 1 commit into
gwastro:masterfrom
ahnitz:pr-fft-nbatch-fix

Conversation

@ahnitz

@ahnitz ahnitz commented Aug 6, 2026

Copy link
Copy Markdown
Member

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.

Standard information about the request

This is a bug fix.

This change affects nothing as we didn't use this option in any codes.

This change: has appropriate unit tests, follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines

This change will: break current functionality, require additional dependencies, require a new release, other (please describe)

Motivation

Contents

Links to any issues or associated PRs

Testing performed

I've tested this in a downstream PR #5395.

Additional notes

This is required for #5395

  • The author of this pull request confirms they will adhere to the code of conduct

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.
@ahnitz
ahnitz requested a review from spxiwh August 6, 2026 00:16
@ahnitz
ahnitz marked this pull request as ready for review August 6, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants