diff --git a/pybindings/src/lib.rs b/pybindings/src/lib.rs index 8a00215..7886bb3 100644 --- a/pybindings/src/lib.rs +++ b/pybindings/src/lib.rs @@ -1,10 +1,15 @@ use numpy::PyReadwriteArray1; -use phastft::fft_dif; +use phastft::{fft as fft_rs, planner::Planner}; use pyo3::prelude::*; #[pyfunction] fn fft(mut reals: PyReadwriteArray1, mut imags: PyReadwriteArray1) { - fft_dif(reals.as_slice_mut().unwrap(), imags.as_slice_mut().unwrap()); + let mut planner = Planner::new(reals.len()); + fft_rs( + reals.as_slice_mut().unwrap(), + imags.as_slice_mut().unwrap(), + &mut planner, + ); } /// A Python module implemented in Rust.