Skip to content

Allow dims to be a single tuple when the transform is applied once - #279

Merged
dlfivefifty merged 1 commit into
masterfrom
single-slice-dims
Nov 24, 2026
Merged

dlfivefifty merged 1 commit into
masterfrom
single-slice-dims

Conversation

@dlfivefifty

@dlfivefifty dlfivefifty commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #277. In the plan_* functions that accept dims, a single tuple of dimensions can now be passed when the transform is applied once:

A = randn(n, 3, 4n-3)
plan_disk2cxf(A, α, β, (1,3))   # same as plan_disk2cxf(A, α, β, ((1,3),))
disk2cxf(A, α, β, (1,3))
plan_disk_analysis(A, (1,3))
plan_tet2cheb(B, (1,2,4))       # same as ((1,2,4),)

This covers all the 2D and 3D coefficient transforms (plan_sph2fourier, plan_disk2cxf, plan_tri2cheb, plan_tet2cheb, …) and FFTW synthesis and analysis plans, and through them the one-step functions such as disk2cxf and cxf2disk.

NDimsPlan itself is unchanged. There, NDimsPlan(F, szs, (1,3)) still means applying a vector transform along dimensions 1 and 3. The wrapping is done in the plan_* methods by a new helper, _slicedims(dims, Val(M)), which only wraps a tuple of exactly M integers, where M is the dimension of the slices the transform acts on. Tuples of the wrong length, such as (1,) or (1,2,3) for a 2D transform, still throw ArgumentError, and the error message and docstrings mention the new form.

Bumps the version to 0.17.7. This matches the Zernike plans in JuliaApproximation/MultivariateOrthogonalPolynomials.jl#250, which accept the same form of dims; that PR does not depend on this one.

🤖 Generated with Claude Code

plan_disk2cxf(A, α, β, (1,3)) etc. is now the same as plan_disk2cxf(A, α, β, ((1,3),)),
for all the 2D and 3D coefficient transforms and FFTW synthesis and analysis plans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.23%. Comparing base (4571ebf) to head (5d0edb1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #279      +/-   ##
==========================================
+ Coverage   78.19%   78.23%   +0.04%     
==========================================
  Files          17       17              
  Lines        3315     3322       +7     
==========================================
+ Hits         2592     2599       +7     
  Misses        723      723              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dlfivefifty
dlfivefifty merged commit fe3b6fd into master Nov 24, 2026
20 checks passed
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.

1 participant