Skip to content

Commit

Permalink
Updated docs to use non-deprecated APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
JRRudy1 authored and davidhewitt committed Oct 6, 2024
1 parent 2dc0848 commit 56f6795
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/borrow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ where
/// }
///
/// Python::with_gil(|py| {
/// let np = py.eval("__import__('numpy')", None, None).unwrap();
/// let np = py.eval_bound("__import__('numpy')", None, None).unwrap();
/// let sum_standard_layout = wrap_pyfunction!(sum_standard_layout)(py).unwrap();
/// let sum_dynamic_strides = wrap_pyfunction!(sum_dynamic_strides)(py).unwrap();
///
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ as well as the [`PyReadonlyArray::try_as_matrix`] and [`PyReadwriteArray::try_as
#![cfg_attr(not(feature = "nalgebra"), doc = "```rust,ignore")]
//! use numpy::pyo3::Python;
//! use numpy::nalgebra::Matrix3;
//! use numpy::{pyarray, ToPyArray};
//! use numpy::{pyarray_bound, ToPyArray, PyArrayMethods};
//!
//! Python::with_gil(|py| {
//! let py_array = pyarray![py, [0, 1, 2], [3, 4, 5], [6, 7, 8]];
//! let py_array = pyarray_bound![py, [0, 1, 2], [3, 4, 5], [6, 7, 8]];
//!
//! let py_array_square;
//!
Expand Down

0 comments on commit 56f6795

Please sign in to comment.