Skip to content

Commit b4bf5af

Browse files
committed
update pyo3 to v0.25.0 and numpy to v0.25.0
1 parent 96f9ba4 commit b4bf5af

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

pyDF-data/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ hdf5-static = ["deep_filter/hdf5-static"]
1616

1717
[dependencies]
1818
deep_filter = { features = ["dataset", "logging", "vorbis", "flac"], path = "../libDF" }
19-
pyo3 = { version = "0.22", default-features = true, features = [
19+
pyo3 = { version = "0.25", default-features = true, features = [
2020
"extension-module",
21-
"gil-refs",
2221
] }
23-
numpy = "0.22"
22+
numpy = "0.25"
2423
log = { version = "0.4", features = ["std"] }
2524
crossbeam-channel = "^0.5"
2625
ndarray = "^0.15"

pyDF/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ path = "src/lib.rs"
1212

1313
[dependencies]
1414
deep_filter = { features = ["transforms", "logging"], path = "../libDF" }
15-
pyo3 = { version = "0.22", features = [
15+
pyo3 = { version = "0.25", features = [
1616
"extension-module",
17-
"gil-refs"
1817
] }
19-
numpy = "0.22"
18+
numpy = "0.25"
2019
ndarray = "^0.15"

pyDF/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl DF {
6868
self.state.analysis(ichunk, ochunk)
6969
}
7070
}
71-
Ok(output.into_pyarray_bound(py))
71+
Ok(output.into_pyarray(py))
7272
}
7373

7474
fn synthesis<'py>(
@@ -103,15 +103,15 @@ impl DF {
103103
self.state.synthesis(ichunk, ochunk);
104104
}
105105
}
106-
Ok(output.into_pyarray_bound(py))
106+
Ok(output.into_pyarray(py))
107107
}
108108

109109
fn erb_widths<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyArray1<usize>>> {
110-
Ok(self.state.erb.clone().into_pyarray_bound(py))
110+
Ok(self.state.erb.clone().into_pyarray(py))
111111
}
112112

113113
fn fft_window<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyArray1<f32>>> {
114-
Ok(self.state.window.clone().into_pyarray_bound(py))
114+
Ok(self.state.window.clone().into_pyarray(py))
115115
}
116116

117117
fn sr(&self) -> usize {
@@ -188,7 +188,7 @@ fn libdf(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
188188
.to_py_err()?,
189189
_ => output.into_dimensionality().to_py_err()?,
190190
};
191-
Ok(output.into_pyarray_bound(py))
191+
Ok(output.into_pyarray(py))
192192
}
193193

194194
#[pyfn(m)]
@@ -246,7 +246,7 @@ fn libdf(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
246246
.to_py_err()?,
247247
_ => output.into_dimensionality().to_py_err()?,
248248
};
249-
Ok(output.into_pyarray_bound(py))
249+
Ok(output.into_pyarray(py))
250250
}
251251

252252
#[pyfn(m)]
@@ -270,7 +270,7 @@ fn libdf(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
270270
} else {
271271
transforms::erb_norm(&mut erb.view_mut(), None, alpha).to_py_err()?;
272272
};
273-
Ok(erb.into_owned().into_pyarray_bound(py))
273+
Ok(erb.into_owned().into_pyarray(py))
274274
}
275275

276276
#[pyfn(m)]
@@ -294,7 +294,7 @@ fn libdf(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
294294
} else {
295295
transforms::unit_norm(&mut spec.view_mut(), None, alpha).to_py_err()?;
296296
};
297-
Ok(spec.into_pyarray_bound(py))
297+
Ok(spec.into_pyarray(py))
298298
}
299299

300300
#[pyfn(m)]
@@ -303,7 +303,7 @@ fn libdf(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
303303
let arr = Array1::<f32>::linspace(UNIT_NORM_INIT[0], UNIT_NORM_INIT[1], num_freq_bins)
304304
.into_shape([1, num_freq_bins])
305305
.to_py_err()?;
306-
Ok(arr.into_pyarray_bound(py))
306+
Ok(arr.into_pyarray(py))
307307
}
308308

309309
Ok(())

0 commit comments

Comments
 (0)