@@ -43,7 +43,7 @@ use crate::untyped_array::{PyUntypedArray, PyUntypedArrayMethods};
4343/// These methods transfers ownership of the Rust allocation into a suitable Python object
4444/// and uses the memory as the internal buffer backing the NumPy array.
4545///
46- /// Please note that some destructive methods like [`resize`][Self ::resize] will fail
46+ /// Please note that some destructive methods like [`resize`][PyArrayMethods ::resize] will fail
4747/// when used with this kind of array as NumPy cannot reallocate the internal buffer.
4848///
4949/// - Allocated by NumPy: Constructed via other methods, like [`ToPyArray`] or
@@ -94,6 +94,7 @@ use crate::untyped_array::{PyUntypedArray, PyUntypedArrayMethods};
9494/// });
9595/// ```
9696///
97+ /// [`PyObject`]: pyo3::ffi::PyObject
9798/// [ndarray]: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html
9899/// [pyo3-memory]: https://pyo3.rs/main/memory.html
99100#[ repr( transparent) ]
@@ -183,7 +184,7 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
183184 /// into Python's heap, which NumPy will automatically zero-initialize.
184185 ///
185186 /// However, the elements themselves will not be valid and should be initialized manually
186- /// using raw pointers obtained via [`uget_raw`][Self ::uget_raw]. Before that, all methods
187+ /// using raw pointers obtained via [`uget_raw`][PyArrayMethods ::uget_raw]. Before that, all methods
187188 /// which produce references to the elements invoke undefined behaviour. In particular,
188189 /// zero-initialized pointers are _not_ valid instances of `PyObject`.
189190 ///
@@ -721,7 +722,7 @@ pub trait PyArrayMethods<'py, T, D>: PyUntypedArrayMethods<'py> + Sized {
721722 /// Returns a pointer to the first element of the array.
722723 fn data ( & self ) -> * mut T ;
723724
724- /// Same as [`shape`][PyUntypedArray ::shape], but returns `D` instead of `&[usize]`.
725+ /// Same as [`shape`][PyUntypedArrayMethods ::shape], but returns `D` instead of `&[usize]`.
725726 #[ inline( always) ]
726727 fn dims ( & self ) -> D
727728 where
0 commit comments