1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! f64 DSP primitives and optimizers with SciPy/NumPy semantics.
//!
//! Shared by `secs-engine`, `secs-mdat` (response caches), `secs-camilla`
//! (FIR resampling) and `secs-audio` (sweep deconvolution). Functions match
//! the NumPy/SciPy calls SECS 2 makes, including the details a port must keep
//! (docs/ARCHITECTURE.md, "Numerics"):
//!
//! - FFT through cached `realfft` plans; pairwise summation where NumPy sums.
//! - RBJ biquads, analog LR/BW prototypes, all-pass, minimum phase (cepstrum),
//! fractional-octave smoothing, group delay, `butter`/`sosfilt`/`firwin`,
//! `find_peaks` with the plateau-midpoint rule.
//! - `least_squares` (bounded TRF, exact trust-region solver, two-point
//! Jacobians; `max_nfev` counts residual calls only), ported
//! from SciPy 1.18.1 by way of Impulcifer's `optimize.rs` (MIT).
//! - Differential evolution uses legacy RandomState (MT19937) with SciPy's
//! immediate best1bin draw order and Latin-hypercube initialization.
//! - Rounding is half-to-even (`f64::round_ties_even`) wherever NumPy rounds.
//!
//! There is no handwritten `std::arch`; faer SIMD dispatch is provided by pulp.
//!
//! New primitive APIs return `Result` for data-dependent upstream failures.
//! Allocation failure or unrepresentable array/order sizes are programmer errors.
//! FFT APIs retain their documented panic contract. TRF parity is partial;
//! see `tests/golden.rs` and the feature registry before using it in an engine.
pub use Complex64;
pub use divide as complex_div;
pub use interp;
pub use sum as pairwise_sum;
/// Data-dependent errors corresponding to upstream invalid inputs.
pub