Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dimension/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ fn slice_min_max(axis_len: usize, slice: Slice) -> Option<(usize, usize)> {
}

/// Returns `true` iff the slices intersect.
#[doc(hidden)]
#[allow(dead_code)]
pub fn slices_intersect<D: Dimension>(
dim: &D,
indices1: &D::SliceArg,
Expand Down
28 changes: 3 additions & 25 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,13 @@ use std::marker::PhantomData;
use std::sync::Arc;

pub use crate::dimension::dim::*;
pub use crate::dimension::{
slices_intersect, Axis, AxisDescription, Dimension, IntoDimension, RemoveAxis,
};
pub use crate::dimension::{Axis, AxisDescription, Dimension, IntoDimension, RemoveAxis};

pub use crate::dimension::IxDynImpl;
pub use crate::dimension::NdIndex;
pub use crate::error::{ErrorKind, ShapeError};
pub use crate::indexes::{indices, indices_of};
pub use crate::slice::{
deref_raw_view_mut_into_view_mut_with_life, deref_raw_view_mut_into_view_with_life,
life_of_view_mut, Slice, SliceInfo, SliceNextDim, SliceOrIndex,
};
pub use crate::slice::{Slice, SliceInfo, SliceNextDim, SliceOrIndex};

use crate::iterators::Baseiter;
use crate::iterators::{ElementsBase, ElementsBaseMut, Iter, IterMut, Lanes, LanesMut};
Expand Down Expand Up @@ -478,13 +473,10 @@ pub type Ixs = isize;
/// [`.slice_move()`]: #method.slice_move
/// [`.slice_collapse()`]: #method.slice_collapse
///
/// It's possible to take multiple simultaneous *mutable* slices with the
/// [`multislice!()`](macro.multislice!.html) macro.
///
/// ```
/// extern crate ndarray;
///
/// use ndarray::{arr2, arr3, multislice, s};
/// use ndarray::{arr2, arr3, s};
///
/// fn main() {
///
Expand Down Expand Up @@ -531,20 +523,6 @@ pub type Ixs = isize;
/// [12, 11, 10]]);
/// assert_eq!(f, g);
/// assert_eq!(f.shape(), &[2, 3]);
///
/// // Let's take two disjoint, mutable slices of a matrix with
/// //
/// // - One containing all the even-index columns in the matrix
/// // - One containing all the odd-index columns in the matrix
/// let mut h = arr2(&[[0, 1, 2, 3],
/// [4, 5, 6, 7]]);
/// let (s0, s1) = multislice!(h, mut [.., ..;2], mut [.., 1..;2]);
/// let i = arr2(&[[0, 2],
/// [4, 6]]);
/// let j = arr2(&[[1, 3],
/// [5, 7]]);
/// assert_eq!(s0, i);
/// assert_eq!(s1, j);
/// }
/// ```
///
Expand Down
Loading