Skip to content

Commit 08068ef

Browse files
committed
Adjust pybindings to work with new API
1 parent 98d20e7 commit 08068ef

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pybindings/src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
use numpy::PyReadwriteArray1;
2-
use phastft::fft_dif;
2+
use phastft::{fft as fft_rs, planner::Planner};
33
use pyo3::prelude::*;
44

55
#[pyfunction]
66
fn fft(mut reals: PyReadwriteArray1<f64>, mut imags: PyReadwriteArray1<f64>) {
7-
fft_dif(reals.as_slice_mut().unwrap(), imags.as_slice_mut().unwrap());
7+
let mut planner = Planner::new(reals.len());
8+
fft_rs(
9+
reals.as_slice_mut().unwrap(),
10+
imags.as_slice_mut().unwrap(),
11+
&mut planner,
12+
);
813
}
914

1015
/// A Python module implemented in Rust.

0 commit comments

Comments
 (0)