Skip to content

Commit 9c5d52e

Browse files
bschoenmaeckersdavidhewitt
authored andcommitted
Update convert.rs
1 parent cd03504 commit 9c5d52e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/convert.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ pub trait IntoPyArray: Sized {
4141
type Dim: Dimension;
4242

4343
/// Deprecated form of [`IntoPyArray::into_pyarray_bound`]
44-
#[deprecated(
45-
since = "0.21.0",
46-
note = "will be replaced by `IntoPyArray::into_pyarray_bound` in the future"
47-
)]
44+
#[cfg(feature = "gil-refs")]
4845
fn into_pyarray<'py>(self, py: Python<'py>) -> &'py PyArray<Self::Item, Self::Dim> {
4946
Self::into_pyarray_bound(self, py).into_gil_ref()
5047
}
@@ -152,10 +149,7 @@ pub trait ToPyArray {
152149
type Dim: Dimension;
153150

154151
/// Deprecated form of [`ToPyArray::to_pyarray_bound`]
155-
#[deprecated(
156-
since = "0.21.0",
157-
note = "will be replaced by `ToPyArray::to_pyarray_bound` in the future"
158-
)]
152+
#[cfg(feature = "gil-refs")]
159153
fn to_pyarray<'py>(&self, py: Python<'py>) -> &'py PyArray<Self::Item, Self::Dim> {
160154
Self::to_pyarray_bound(self, py).into_gil_ref()
161155
}

0 commit comments

Comments
 (0)