Skip to content

Commit 56f6795

Browse files
JRRudy1davidhewitt
authored andcommitted
Updated docs to use non-deprecated APIs.
1 parent 2dc0848 commit 56f6795

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/borrow/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ where
305305
/// }
306306
///
307307
/// Python::with_gil(|py| {
308-
/// let np = py.eval("__import__('numpy')", None, None).unwrap();
308+
/// let np = py.eval_bound("__import__('numpy')", None, None).unwrap();
309309
/// let sum_standard_layout = wrap_pyfunction!(sum_standard_layout)(py).unwrap();
310310
/// let sum_dynamic_strides = wrap_pyfunction!(sum_dynamic_strides)(py).unwrap();
311311
///

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ as well as the [`PyReadonlyArray::try_as_matrix`] and [`PyReadwriteArray::try_as
3939
#![cfg_attr(not(feature = "nalgebra"), doc = "```rust,ignore")]
4040
//! use numpy::pyo3::Python;
4141
//! use numpy::nalgebra::Matrix3;
42-
//! use numpy::{pyarray, ToPyArray};
42+
//! use numpy::{pyarray_bound, ToPyArray, PyArrayMethods};
4343
//!
4444
//! Python::with_gil(|py| {
45-
//! let py_array = pyarray![py, [0, 1, 2], [3, 4, 5], [6, 7, 8]];
45+
//! let py_array = pyarray_bound![py, [0, 1, 2], [3, 4, 5], [6, 7, 8]];
4646
//!
4747
//! let py_array_square;
4848
//!

0 commit comments

Comments
 (0)