Skip to content

Commit 242590a

Browse files
committed
Removed AsPyRef from test import
1 parent 28bbe9a commit 242590a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<'a, T: Element, D: Dimension> FromPyObject<'a> for &'a PyArray<T, D> {
132132
fn extract(ob: &'a PyAny) -> PyResult<Self> {
133133
let array = unsafe {
134134
if npyffi::PyArray_Check(ob.as_ptr()) == 0 {
135-
return Err(PyDowncastError::new(ob, "Array").into());
135+
return Err(PyDowncastError::new(ob, "PyArray<T, D>").into());
136136
}
137137
&*(ob as *const PyAny as *const PyArray<T, D>)
138138
};
@@ -207,7 +207,7 @@ impl<T, D> PyArray<T, D> {
207207
///
208208
/// # Example
209209
/// ```
210-
/// use pyo3::{GILGuard, Python, Py, AsPyRef};
210+
/// use pyo3::{GILGuard, Python, Py};
211211
/// use numpy::PyArray1;
212212
/// fn return_py_array() -> Py<PyArray1<i32>> {
213213
/// let gil = Python::acquire_gil();

0 commit comments

Comments
 (0)