Skip to content

Commit e531922

Browse files
bschoenmaeckersdavidhewitt
authored andcommitted
Update untyped_arrays
1 parent d477a55 commit e531922

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/untyped_array.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
//! [ndarray]: https://numpy.org/doc/stable/reference/arrays.ndarray.html
44
use std::slice;
55

6+
#[cfg(feature = "gil-refs")]
7+
use pyo3::PyNativeType;
68
use pyo3::{
79
ffi, pyobject_native_type_extract, pyobject_native_type_named, types::PyAnyMethods,
8-
AsPyPointer, Bound, IntoPy, PyAny, PyNativeType, PyObject, PyTypeInfo, Python,
10+
AsPyPointer, Bound, IntoPy, PyAny, PyObject, PyTypeInfo, Python,
911
};
1012

1113
use crate::array::{PyArray, PyArrayMethods};
@@ -85,6 +87,7 @@ impl IntoPy<PyObject> for PyUntypedArray {
8587

8688
pyobject_native_type_extract!(PyUntypedArray);
8789

90+
#[cfg(feature = "gil-refs")]
8891
impl PyUntypedArray {
8992
/// Returns a raw pointer to the underlying [`PyArrayObject`][npyffi::PyArrayObject].
9093
#[inline]

0 commit comments

Comments
 (0)