Skip to content

Commit 2b34bf8

Browse files
committed
Fixes doc links
1 parent db52eab commit 2b34bf8

File tree

17 files changed

+142
-139
lines changed

17 files changed

+142
-139
lines changed

src/alias_asref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<S: RawData, D: Dimension> ArrayBase<S, D>
3131
///
3232
/// - if an index is out of bounds
3333
/// - if a step size is zero
34-
/// - if [`SliceInfoElem::NewAxis`] is in `info`, e.g. if [`NewAxis`] was
34+
/// - if [`NewAxis`](`crate::SliceInfoElem::NewAxis`) is in `info`, e.g. if `NewAxis` was
3535
/// used in the [`s!`] macro
3636
/// - if `D` is `IxDyn` and `info` does not match the number of array axes
3737
#[track_caller]

src/doc/ndarray_for_numpy_users/mod.rs

Lines changed: 50 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@
322322
//!
323323
//! </td><td>
324324
//!
325-
//! [`mat1.dot(&mat2)`][matrix-* dot]
325+
//! [`mat1.dot(&mat2)`][dot-2-2]
326326
//!
327327
//! </td><td>
328328
//!
@@ -336,7 +336,7 @@
336336
//!
337337
//! </td><td>
338338
//!
339-
//! [`mat.dot(&vec)`][matrix-* dot]
339+
//! [`mat.dot(&vec)`][dot-2-1]
340340
//!
341341
//! </td><td>
342342
//!
@@ -350,7 +350,7 @@
350350
//!
351351
//! </td><td>
352352
//!
353-
//! [`vec.dot(&mat)`][vec-* dot]
353+
//! [`vec.dot(&mat)`][dot-1-2]
354354
//!
355355
//! </td><td>
356356
//!
@@ -364,7 +364,7 @@
364364
//!
365365
//! </td><td>
366366
//!
367-
//! [`vec1.dot(&vec2)`][vec-* dot]
367+
//! [`vec1.dot(&vec2)`][dot-1-1]
368368
//!
369369
//! </td><td>
370370
//!
@@ -670,22 +670,22 @@
670670
//! `a[:,4]` | [`a.column(4)`][.column()] or [`a.column_mut(4)`][.column_mut()] | view (or mutable view) of column 4 in a 2-D array
671671
//! `a.shape[0] == a.shape[1]` | [`a.is_square()`][.is_square()] | check if the array is square
672672
//!
673-
//! [.abs_diff_eq()]: ArrayBase#impl-AbsDiffEq<ArrayBase<S2%2C%20D>>
674-
//! [.assign()]: ArrayBase::assign
675-
//! [.axis_iter()]: ArrayBase::axis_iter
676-
//! [.ncols()]: ArrayBase::ncols
677-
//! [.column()]: ArrayBase::column
678-
//! [.column_mut()]: ArrayBase::column_mut
673+
//! [.abs_diff_eq()]: ArrayRef#impl-AbsDiffEq%3CArrayRef%3CB,+D%3E%3E
674+
//! [.assign()]: ArrayRef::assign
675+
//! [.axis_iter()]: ArrayRef::axis_iter
676+
//! [.ncols()]: LayoutRef::ncols
677+
//! [.column()]: ArrayRef::column
678+
//! [.column_mut()]: ArrayRef::column_mut
679679
//! [concatenate()]: crate::concatenate()
680680
//! [concatenate!]: crate::concatenate!
681681
//! [stack!]: crate::stack!
682682
//! [::default()]: ArrayBase::default
683-
//! [.diag()]: ArrayBase::diag
684-
//! [.dim()]: ArrayBase::dim
683+
//! [.diag()]: ArrayRef::diag
684+
//! [.dim()]: LayoutRef::dim
685685
//! [::eye()]: ArrayBase::eye
686-
//! [.fill()]: ArrayBase::fill
687-
//! [.fold()]: ArrayBase::fold
688-
//! [.fold_axis()]: ArrayBase::fold_axis
686+
//! [.fill()]: ArrayRef::fill
687+
//! [.fold()]: ArrayRef::fold
688+
//! [.fold_axis()]: ArrayRef::fold_axis
689689
//! [::from_elem()]: ArrayBase::from_elem
690690
//! [::from_iter()]: ArrayBase::from_iter
691691
//! [::from_diag()]: ArrayBase::from_diag
@@ -694,48 +694,51 @@
694694
//! [::from_shape_vec_unchecked()]: ArrayBase::from_shape_vec_unchecked
695695
//! [::from_vec()]: ArrayBase::from_vec
696696
//! [.index()]: ArrayBase#impl-Index<I>
697-
//! [.indexed_iter()]: ArrayBase::indexed_iter
697+
//! [.indexed_iter()]: ArrayRef::indexed_iter
698698
//! [.insert_axis()]: ArrayBase::insert_axis
699-
//! [.is_empty()]: ArrayBase::is_empty
700-
//! [.is_square()]: ArrayBase::is_square
701-
//! [.iter()]: ArrayBase::iter
702-
//! [.len()]: ArrayBase::len
703-
//! [.len_of()]: ArrayBase::len_of
699+
//! [.is_empty()]: LayoutRef::is_empty
700+
//! [.is_square()]: LayoutRef::is_square
701+
//! [.iter()]: ArrayRef::iter
702+
//! [.len()]: LayoutRef::len
703+
//! [.len_of()]: LayoutRef::len_of
704704
//! [::linspace()]: ArrayBase::linspace
705705
//! [::logspace()]: ArrayBase::logspace
706706
//! [::geomspace()]: ArrayBase::geomspace
707-
//! [.map()]: ArrayBase::map
708-
//! [.map_axis()]: ArrayBase::map_axis
709-
//! [.map_inplace()]: ArrayBase::map_inplace
710-
//! [.mapv()]: ArrayBase::mapv
711-
//! [.mapv_inplace()]: ArrayBase::mapv_inplace
707+
//! [.map()]: ArrayRef::map
708+
//! [.map_axis()]: ArrayRef::map_axis
709+
//! [.map_inplace()]: ArrayRef::map_inplace
710+
//! [.mapv()]: ArrayRef::mapv
711+
//! [.mapv_inplace()]: ArrayRef::mapv_inplace
712712
//! [.mapv_into()]: ArrayBase::mapv_into
713-
//! [matrix-* dot]: ArrayBase::dot-1
714-
//! [.mean()]: ArrayBase::mean
715-
//! [.mean_axis()]: ArrayBase::mean_axis
716-
//! [.ndim()]: ArrayBase::ndim
713+
//! [dot-2-2]: ArrayRef#impl-Dot<ArrayRef<A,+Dim<[usize;+2]>>>-for-ArrayRef<A,+Dim<[usize;+2]>>
714+
//! [dot-1-1]: ArrayRef#impl-Dot<ArrayRef<A,+Dim<[usize;+1]>>>-for-ArrayRef<A,+Dim<[usize;+1]>>
715+
//! [dot-1-2]: ArrayRef#impl-Dot<ArrayRef<A,+Dim<[usize;+2]>>>-for-ArrayRef<A,+Dim<[usize;+1]>>
716+
//! [dot-2-1]: ArrayRef#impl-Dot<ArrayRef<A,+Dim<[usize;+1]>>>-for-ArrayRef<A,+Dim<[usize;+2]>>
717+
//! [.mean()]: ArrayRef::mean
718+
//! [.mean_axis()]: ArrayRef::mean_axis
719+
//! [.ndim()]: LayoutRef::ndim
717720
//! [::ones()]: ArrayBase::ones
718-
//! [.outer_iter()]: ArrayBase::outer_iter
721+
//! [.outer_iter()]: ArrayRef::outer_iter
719722
//! [::range()]: ArrayBase::range
720-
//! [.raw_dim()]: ArrayBase::raw_dim
723+
//! [.raw_dim()]: LayoutRef::raw_dim
721724
//! [.reversed_axes()]: ArrayBase::reversed_axes
722-
//! [.row()]: ArrayBase::row
723-
//! [.row_mut()]: ArrayBase::row_mut
724-
//! [.nrows()]: ArrayBase::nrows
725-
//! [.sum()]: ArrayBase::sum
726-
//! [.slice()]: ArrayBase::slice
727-
//! [.slice_axis()]: ArrayBase::slice_axis
728-
//! [.slice_collapse()]: ArrayBase::slice_collapse
725+
//! [.row()]: ArrayRef::row
726+
//! [.row_mut()]: ArrayRef::row_mut
727+
//! [.nrows()]: LayoutRef::nrows
728+
//! [.sum()]: ArrayRef::sum
729+
//! [.slice()]: ArrayRef::slice
730+
//! [.slice_axis()]: ArrayRef::slice_axis
731+
//! [.slice_collapse()]: LayoutRef::slice_collapse
729732
//! [.slice_move()]: ArrayBase::slice_move
730-
//! [.slice_mut()]: ArrayBase::slice_mut
731-
//! [.shape()]: ArrayBase::shape
733+
//! [.slice_mut()]: ArrayRef::slice_mut
734+
//! [.shape()]: LayoutRef::shape
732735
//! [stack()]: crate::stack()
733-
//! [.strides()]: ArrayBase::strides
734-
//! [.index_axis()]: ArrayBase::index_axis
735-
//! [.sum_axis()]: ArrayBase::sum_axis
736-
//! [.t()]: ArrayBase::t
737-
//! [vec-* dot]: ArrayBase::dot
738-
//! [.for_each()]: ArrayBase::for_each
736+
//! [.strides()]: LayoutRef::strides
737+
//! [.index_axis()]: ArrayRef::index_axis
738+
//! [.sum_axis()]: ArrayRef::sum_axis
739+
//! [.t()]: ArrayRef::t
740+
//! [vec-* dot]: ArrayRef::dot
741+
//! [.for_each()]: ArrayRef::for_each
739742
//! [::zeros()]: ArrayBase::zeros
740743
//! [`Zip`]: crate::Zip
741744

src/doc/ndarray_for_numpy_users/rk_step.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
//!
123123
//! * Use [`c.mul_add(h, t)`](f64::mul_add) instead of `t + c * h`. This is
124124
//! faster and reduces the floating-point error. It might also be beneficial
125-
//! to use [`.scaled_add()`] or a combination of
125+
//! to use [`.scaled_add()`](crate::ArrayRef::scaled_add) or a combination of
126126
//! [`azip!()`] and [`.mul_add()`](f64::mul_add) on the arrays in
127127
//! some places, but that's not demonstrated in the example below.
128128
//!

src/impl_methods.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ where
253253
/// If the input array is contiguous, then the output array will have the same
254254
/// memory layout. Otherwise, the layout of the output array is unspecified.
255255
/// If you need a particular layout, you can allocate a new array with the
256-
/// desired memory layout and [`.assign()`](Self::assign) the data.
256+
/// desired memory layout and [`.assign()`](ArrayRef::assign) the data.
257257
/// Alternatively, you can collectan iterator, like this for a result in
258258
/// standard layout:
259259
///
@@ -630,9 +630,9 @@ impl<A, D: Dimension> LayoutRef<A, D>
630630
/// collapsed, as in [`.collapse_axis()`], rather than removed, as in
631631
/// [`.slice_move()`] or [`.index_axis_move()`].
632632
///
633-
/// [`.collapse_axis()`]: Self::collapse_axis
634-
/// [`.slice_move()`]: Self::slice_move
635-
/// [`.index_axis_move()`]: Self::index_axis_move
633+
/// [`.collapse_axis()`]: LayoutRef::collapse_axis
634+
/// [`.slice_move()`]: ArrayBase::slice_move
635+
/// [`.index_axis_move()`]: ArrayBase::index_axis_move
636636
///
637637
/// See [*Slicing*](#slicing) for full documentation.
638638
/// See also [`s!`], [`SliceArg`], and [`SliceInfo`](crate::SliceInfo).
@@ -1056,7 +1056,7 @@ where
10561056
{
10571057
/// Collapses the array to `index` along the axis and removes the axis.
10581058
///
1059-
/// See [`.index_axis()`](Self::index_axis) and [*Subviews*](#subviews) for full documentation.
1059+
/// See [`.index_axis()`](ArrayRef::index_axis) and [*Subviews*](#subviews) for full documentation.
10601060
///
10611061
/// **Panics** if `axis` or `index` is out of bounds.
10621062
#[track_caller]
@@ -1468,13 +1468,13 @@ impl<A, D: Dimension> ArrayRef<A, D>
14681468
/// `window_size`.
14691469
///
14701470
/// Note that passing a stride of only ones is similar to
1471-
/// calling [`ArrayBase::windows()`].
1471+
/// calling [`ArrayRef::windows()`].
14721472
///
14731473
/// **Panics** if any dimension of `window_size` or `stride` is zero.<br>
14741474
/// (**Panics** if `D` is `IxDyn` and `window_size` or `stride` does not match the
14751475
/// number of array axes.)
14761476
///
1477-
/// This is the same illustration found in [`ArrayBase::windows()`],
1477+
/// This is the same illustration found in [`ArrayRef::windows()`],
14781478
/// 2×2 windows in a 3×4 array, but now with a (1, 2) stride:
14791479
///
14801480
/// ```text
@@ -2943,7 +2943,7 @@ where
29432943
/// Elements are visited in arbitrary order.
29442944
///
29452945
/// [`mapv_into`]: ArrayBase::mapv_into
2946-
/// [`mapv`]: ArrayBase::mapv
2946+
/// [`mapv`]: ArrayRef::mapv
29472947
pub fn mapv_into_any<B, F>(self, mut f: F) -> Array<B, D>
29482948
where
29492949
S: DataMut,

src/impl_views/conversions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ where D: Dimension
3535
/// Return the array’s data as a slice, if it is contiguous and in standard order.
3636
/// Return `None` otherwise.
3737
///
38-
/// Note that while the method is similar to [`ArrayBase::as_slice()`], this method transfers
38+
/// Note that while the method is similar to [`ArrayRef::as_slice()`], this method transfers
3939
/// the view's lifetime to the slice, so it is a bit more powerful.
4040
pub fn to_slice(&self) -> Option<&'a [A]>
4141
{
@@ -50,7 +50,7 @@ where D: Dimension
5050
/// Return `None` otherwise.
5151
///
5252
/// Note that while the method is similar to
53-
/// [`ArrayBase::as_slice_memory_order()`], this method transfers the view's
53+
/// [`ArrayRef::as_slice_memory_order()`], this method transfers the view's
5454
/// lifetime to the slice, so it is a bit more powerful.
5555
pub fn to_slice_memory_order(&self) -> Option<&'a [A]>
5656
{

src/impl_views/indexing.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,23 @@ pub trait IndexLonger<I>
6060
/// See also [the `get` method][1] which works for all arrays and array
6161
/// views.
6262
///
63-
/// [1]: ArrayBase::get
63+
/// [1]: ArrayRef::get
6464
///
6565
/// **Panics** if index is out of bounds.
6666
#[track_caller]
6767
fn index(self, index: I) -> Self::Output;
6868

6969
/// Get a reference of a element through the view.
7070
///
71-
/// This method is like `ArrayBase::get` but with a longer lifetime (matching
71+
/// This method is like `ArrayRef::get` but with a longer lifetime (matching
7272
/// the array view); which we can only do for the array view and not in the
7373
/// `Index` trait.
7474
///
7575
/// See also [the `get` method][1] (and [`get_mut`][2]) which works for all arrays and array
7676
/// views.
7777
///
78-
/// [1]: ArrayBase::get
79-
/// [2]: ArrayBase::get_mut
78+
/// [1]: ArrayRef::get
79+
/// [2]: ArrayRef::get_mut
8080
///
8181
/// **Panics** if index is out of bounds.
8282
#[track_caller]
@@ -90,7 +90,7 @@ pub trait IndexLonger<I>
9090
/// See also [the `uget` method][1] which works for all arrays and array
9191
/// views.
9292
///
93-
/// [1]: ArrayBase::uget
93+
/// [1]: ArrayRef::uget
9494
///
9595
/// **Note:** only unchecked for non-debug builds of ndarray.
9696
///
@@ -116,7 +116,7 @@ where
116116
/// See also [the `get` method][1] which works for all arrays and array
117117
/// views.
118118
///
119-
/// [1]: ArrayBase::get
119+
/// [1]: ArrayRef::get
120120
///
121121
/// **Panics** if index is out of bounds.
122122
#[track_caller]
@@ -139,7 +139,7 @@ where
139139
/// See also [the `uget` method][1] which works for all arrays and array
140140
/// views.
141141
///
142-
/// [1]: ArrayBase::uget
142+
/// [1]: ArrayRef::uget
143143
///
144144
/// **Note:** only unchecked for non-debug builds of ndarray.
145145
unsafe fn uget(self, index: I) -> &'a A
@@ -165,7 +165,7 @@ where
165165
/// See also [the `get_mut` method][1] which works for all arrays and array
166166
/// views.
167167
///
168-
/// [1]: ArrayBase::get_mut
168+
/// [1]: ArrayRef::get_mut
169169
///
170170
/// **Panics** if index is out of bounds.
171171
#[track_caller]
@@ -186,7 +186,7 @@ where
186186
/// See also [the `get_mut` method][1] which works for all arrays and array
187187
/// views.
188188
///
189-
/// [1]: ArrayBase::get_mut
189+
/// [1]: ArrayRef::get_mut
190190
///
191191
fn get(mut self, index: I) -> Option<&'a mut A>
192192
{
@@ -205,7 +205,7 @@ where
205205
/// See also [the `uget_mut` method][1] which works for all arrays and array
206206
/// views.
207207
///
208-
/// [1]: ArrayBase::uget_mut
208+
/// [1]: ArrayRef::uget_mut
209209
///
210210
/// **Note:** only unchecked for non-debug builds of ndarray.
211211
unsafe fn uget(mut self, index: I) -> &'a mut A

src/impl_views/splitting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ where D: Dimension
157157
/// [`MultiSliceArg`], [`s!`], [`SliceArg`](crate::SliceArg), and
158158
/// [`SliceInfo`](crate::SliceInfo).
159159
///
160-
/// [`.multi_slice_mut()`]: ArrayBase::multi_slice_mut
160+
/// [`.multi_slice_mut()`]: ArrayRef::multi_slice_mut
161161
///
162162
/// **Panics** if any of the following occur:
163163
///

src/iterators/chunks.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl_ndproducer! {
2727

2828
/// Exact chunks producer and iterable.
2929
///
30-
/// See [`.exact_chunks()`](ArrayBase::exact_chunks) for more
30+
/// See [`.exact_chunks()`](crate::ArrayRef::exact_chunks) for more
3131
/// information.
3232
//#[derive(Debug)]
3333
pub struct ExactChunks<'a, A, D>
@@ -93,7 +93,7 @@ where
9393

9494
/// Exact chunks iterator.
9595
///
96-
/// See [`.exact_chunks()`](ArrayBase::exact_chunks) for more
96+
/// See [`.exact_chunks()`](crate::ArrayRef::exact_chunks) for more
9797
/// information.
9898
pub struct ExactChunksIter<'a, A, D>
9999
{
@@ -126,7 +126,7 @@ impl_ndproducer! {
126126

127127
/// Exact chunks producer and iterable.
128128
///
129-
/// See [`.exact_chunks_mut()`](ArrayBase::exact_chunks_mut)
129+
/// See [`.exact_chunks_mut()`](crate::ArrayRef::exact_chunks_mut)
130130
/// for more information.
131131
//#[derive(Debug)]
132132
pub struct ExactChunksMut<'a, A, D>
@@ -237,7 +237,7 @@ impl_iterator! {
237237

238238
/// Exact chunks iterator.
239239
///
240-
/// See [`.exact_chunks_mut()`](ArrayBase::exact_chunks_mut)
240+
/// See [`.exact_chunks_mut()`](crate::ArrayRef::exact_chunks_mut)
241241
/// for more information.
242242
pub struct ExactChunksIterMut<'a, A, D>
243243
{

src/iterators/lanes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl_ndproducer! {
2323
}
2424
}
2525

26-
/// See [`.lanes()`](ArrayBase::lanes)
26+
/// See [`.lanes()`](crate::ArrayRef::lanes)
2727
/// for more information.
2828
pub struct Lanes<'a, A, D>
2929
{
@@ -92,7 +92,7 @@ where D: Dimension
9292
}
9393
}
9494

95-
/// See [`.lanes_mut()`](ArrayBase::lanes_mut)
95+
/// See [`.lanes_mut()`](crate::ArrayRef::lanes_mut)
9696
/// for more information.
9797
pub struct LanesMut<'a, A, D>
9898
{

0 commit comments

Comments
 (0)