Changelog
Source:NEWS.md
zufft 0.2.0
New features
- The C table in
inst/include/zufft.hgains single-precision members,c2c_f(),r2c_f()andc2r_f(), for consumers whose data arefloat(#31). They are appended, so consumers built against 0.1.0 are unaffected;ZUFFT_HAS(api, c2c_f)tells a consumer whether the loaded zufft has them, andzufft_api_get()now accepts a 0.1.0 table. Their results repeat for a givennthreadsbut, unlike the double members’, may differ in the last bit between thread counts (#89).
Bug fixes
- Transforming an empty axis other than the first with
nno longer crashes R (#69). -
fft_stats()andmvfft_stats()acceptDate,POSIXctanddifftimeinput asstats::fft()does, and readinverseas it does, a list included (#70). - Arrays of more than 64 dimensions transform, instead of failing with an internal error (#71).
- The C table reads
_R_CHECK_LIMIT_CORES_case-insensitively, as the R functions do (#72). - Unloading zufft now joins its worker threads:
R_unload_zufft()was never called, so on Windows reloading the package with live workers could crash R (#75). - Running out of memory while the thread pool grows now raises the same
zufft_engine_error(“out of memory”) as any other allocation failure, instead of azufft_thread_error(#80). -
fft_stats()andmvfft_stats()read a factorinverseby its integer code, asstats::fft()does, rather than by its label (#85). - The worker threads are joined however the DLL is unloaded, including
pkgload::unload()’s fallback while another package imports zufft (#86). - After zufft is unloaded and loaded again, the C table’s
nthreads = 0followsfft_workers()again instead of keeping the value set before (#88). - A process that used several threads no longer hangs at exit when its output pipe closes: the worker threads block signals, so R’s handlers never run on them (#90).
-
fft_workers()refuses a negative count that leaves fewer than one thread when it is set, instead of making every later transform fail (#96).
zufft 0.1.0
CRAN release: 2026-10-22
First release.
-
fft_c2c(),fft_r2c()andfft_c2r()compute complex, real-to-complex and complex-to-real discrete Fourier transforms over any axes of an array, with SciPy’s crop-or-padnandnorm = "backward","ortho","forward"or"none"(the unnormalised convention of fftwtools andstats::fft()). - With
axes = NULL,fft_r2c()andfft_c2r()halve the first dimension, the contiguous one in R, as fftwtools’ 2-D and 3-D real transforms do; giveaxesexplicitly to halve the last axis listed, as SciPy does. - Results are bit-identical whatever the number of threads:
zufft_info()$fp_contractis"off"for every build that cannot fuse multiply-adds, which includes all of CRAN’s. -
fft_dct()andfft_dst()compute discrete cosine and sine transforms of types 1 to 4 and their inverses over any axes, with SciPy’s definitions,normandorthogonalize. -
fft_next_len()andfft_prev_len()find fast transform lengths;fft_freq(),fft_rfreq(),fft_shift()andfft_ishift()are SciPy’s frequency and shift helpers. -
fft_stats()andmvfft_stats()are drop-in replacements forstats::fft()andstats::mvfft(). -
workersruns a transform on several threads, through zufft’s own lazy thread pool;fft_workers(),with_fft_workers()andlocal_fft_workers()set the default. Results do not depend on the number of threads, and forked children (parallel::mclapply()) are safe. - A registered C table and the header
inst/include/zufft.hlet other packages call the transforms from C withLinkingTo: zufft, from any thread. - Setting the environment variable
ZUFFT_CXXFLAGS(for example to"-march=native") before installing from source builds zufft for the local CPU on Linux and macOS; see the README. -
vignette("migrating-from-fftwtools")maps every fftwtools function to zufft; an article coversscipy.fftusers. - Bundles the BSD-licensed FFT subset of ducc0 (the files and commit SciPy vendors) and compiles it.
-
zufft_info()reports the vendored ducc0 and SciPy commits, the SIMD backend and width, fused multiply-add support, the threading mode and the complex path.