th_cheb2leg and th_leg2cheb support FFT like interface, eg., for a matrix fft(X, 1) transforms the 1st dimension, fft(X, 2) the 2nd and fft(X) == fft(X, (1,2)) == fft(X, 1:2) transforms both.
What to do about parameters though? Should it be jac2jac(X, a, b, α, β, 1) to transform the 1st dimension or jac2jac(X, 1, a, b, α, β)?
Or should we be using tuples here: jac2jac(X, (a, b), (α, β), 1)?