Skip to content

Commit bff49a4

Browse files
authored
Merge pull request #277 from PyO3/doc-updates
Do some copy-editing and start making use of intra doc links
2 parents 61882e3 + 7f8853c commit bff49a4

File tree

5 files changed

+200
-138
lines changed

5 files changed

+200
-138
lines changed

src/array.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//! Safe interface for NumPy ndarray
1+
//! Safe interface for NumPy's ndarray class
2+
23
use std::{
34
marker::PhantomData,
45
mem,
@@ -22,6 +23,7 @@ use crate::convert::{ArrayExt, IntoPyArray, NpyIndex, ToNpyDims, ToPyArray};
2223
use crate::dtype::Element;
2324
use crate::error::{DimensionalityError, FromVecError, NotContiguousError, TypeError};
2425
use crate::npyffi::{self, npy_intp, NPY_ORDER, PY_ARRAY_API};
26+
use crate::readonly::PyReadonlyArray;
2527
use crate::slice_container::PySliceContainer;
2628

2729
/// A safe, static-typed interface for
@@ -104,7 +106,7 @@ pub type PyArray6<T> = PyArray<T, Ix6>;
104106
/// Dynamic-dimensional array.
105107
pub type PyArrayDyn<T> = PyArray<T, IxDyn>;
106108

107-
/// Returns a array module.
109+
/// Returns a handle to NumPy's multiarray module.
108110
pub fn get_array_module(py: Python<'_>) -> PyResult<&PyModule> {
109111
PyModule::import(py, npyffi::array::MOD_NAME)
110112
}
@@ -200,7 +202,7 @@ impl<T, D> PyArray<T, D> {
200202
}
201203

202204
/// Returns a temporally unwriteable reference of the array.
203-
pub fn readonly(&self) -> crate::PyReadonlyArray<T, D> {
205+
pub fn readonly(&self) -> PyReadonlyArray<T, D> {
204206
self.into()
205207
}
206208

0 commit comments

Comments
 (0)