@@ -452,10 +452,11 @@ pub type Ixs = isize;
452
452
///
453
453
/// [`&SliceInfo`]: struct.SliceInfo.html
454
454
///
455
- /// If a range is used, the axis is preserved. If an index is used, a subview
456
- /// is taken with respect to the axis. See [*Subviews*](#subviews) for more
457
- /// information about subviews. Note that [`.slice_inplace()`] behaves like
458
- /// [`.collapse_axis()`] by preserving the number of dimensions.
455
+ /// If a range is used, the axis is preserved. If an index is used, that index
456
+ /// is selected and the axis is removed; this selects a subview. See
457
+ /// [*Subviews*](#subviews) for more information about subviews. Note that
458
+ /// [`.slice_inplace()`] behaves like [`.collapse_axis()`] by preserving the
459
+ /// number of dimensions.
459
460
///
460
461
/// [`.slice()`]: #method.slice
461
462
/// [`.slice_mut()`]: #method.slice_mut
@@ -504,7 +505,7 @@ pub type Ixs = isize;
504
505
/// assert_eq!(d, e);
505
506
/// assert_eq!(d.shape(), &[2, 1, 3]);
506
507
///
507
- /// // Let’s create a slice while taking a subview with
508
+ /// // Let’s create a slice while selecting a subview with
508
509
/// //
509
510
/// // - Both submatrices of the greatest dimension: `..`
510
511
/// // - The last row in each submatrix, removing that axis: `-1`
@@ -520,17 +521,29 @@ pub type Ixs = isize;
520
521
/// ## Subviews
521
522
///
522
523
/// Subview methods allow you to restrict the array view while removing one
523
- /// axis from the array. Subview methods include [`.index_axis()`],
524
- /// [`.index_axis_mut()`], [`.index_axis_move()`], and [`.collapse_axis()`]. You
525
- /// can also take a subview by using a single index instead of a range when
526
- /// slicing.
527
- ///
528
- /// Subview takes two arguments: `axis` and `index`.
529
- ///
524
+ /// axis from the array. Methods for selecting individual subviews include
525
+ /// [`.index_axis()`], [`.index_axis_mut()`], and [`.index_axis_move()`]. You
526
+ /// can also select a subview by using a single index instead of a range when
527
+ /// slicing. Some other methods, such as [`.fold_axis()`], [`.axis_iter()`],
528
+ /// [`.axis_iter_mut()`], [`.outer_iter()`], and [`.outer_iter_mut()`] operate
529
+ /// on all the subviews along an axis.
530
+ ///
531
+ /// A related method is [`.collapse_axis()`], which modifies the view in the
532
+ /// same way as [`.index_axis()`] except for removing the collapsed axis, since
533
+ /// it operates *in place*. The length of the axis becomes 1.
534
+ ///
535
+ /// Methods for selecting an individual subview take two arguments: `axis` and
536
+ /// `index`.
537
+ ///
538
+ /// [`.axis_iter()`]: #method.axis_iter
539
+ /// [`.axis_iter_mut()`]: #method.axis_iter_mut
540
+ /// [`.fold_axis()`]: #method.fold_axis
530
541
/// [`.index_axis()`]: #method.index_axis
531
542
/// [`.index_axis_mut()`]: #method.index_axis_mut
532
543
/// [`.index_axis_move()`]: #method.index_axis_move
533
544
/// [`.collapse_axis()`]: #method.collapse_axis
545
+ /// [`.outer_iter()`]: #method.outer_iter
546
+ /// [`.outer_iter_mut()`]: #method.outer_iter_mut
534
547
///
535
548
/// ```
536
549
/// #[macro_use(s)] extern crate ndarray;
@@ -574,14 +587,6 @@ pub type Ixs = isize;
574
587
/// # }
575
588
/// ```
576
589
///
577
- /// [`.collapse_axis()`] modifies the view in the same way as [`.index_axis()`],
578
- /// but since it is *in place*, it cannot remove the collapsed axis. It becomes
579
- /// an axis of length 1.
580
- ///
581
- /// `.outer_iter()` is an iterator of every subview along the zeroth (outer)
582
- /// axis, while `.axis_iter()` is an iterator of every subview along a
583
- /// specific axis.
584
- ///
585
590
/// ## Arithmetic Operations
586
591
///
587
592
/// Arrays support all arithmetic operations the same way: they apply elementwise.
0 commit comments