From 5525637b7b4f06893d87d751c4f25487228f3a02 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Fri, 29 Nov 2024 12:33:58 +1300 Subject: [PATCH] :alien: Remove _bound suffix from .to_pyarray_bounds PyO3 0.23 completes the removal of the "GIL Refs" API, so the "Bound" API functions which had been introduced with _bound suffixes are no longer needed. Xref https://pyo3.rs/v0.23.2/migration#gil-refs-feature-removed --- src/python/adapters.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/adapters.rs b/src/python/adapters.rs index 6ebbb55..39f6fee 100644 --- a/src/python/adapters.rs +++ b/src/python/adapters.rs @@ -67,7 +67,7 @@ impl PyCogReader { .map_err(|err| PyValueError::new_err(err.to_string()))?; // Convert from ndarray (Rust) to numpy ndarray (Python) - Ok(array_data.to_pyarray_bound(py)) + Ok(array_data.to_pyarray(py)) } /// Get x and y coordinates as numpy.ndarray @@ -80,7 +80,7 @@ impl PyCogReader { .xy_coords() .map_err(|err| PyValueError::new_err(err.to_string()))?; - Ok((x_coords.to_pyarray_bound(py), y_coords.to_pyarray_bound(py))) + Ok((x_coords.to_pyarray(py), y_coords.to_pyarray(py))) } }