extendr_api::prelude

Trait NdIndex

Source
pub unsafe trait NdIndex<E>: Debug { }
Expand description

Tuple or fixed size arrays that can be used to index an array.

use ndarray::arr2;

let mut a = arr2(&[[0, 1],
                   [2, 3]]);
assert_eq!(a[[0, 1]], 1);
assert_eq!(a[[1, 1]], 3);
a[[1, 1]] += 1;
assert_eq!(a[(1, 1)], 4);

Implementations on Foreign Types§

Source§

impl NdIndex<Dim<IxDynImpl>> for usize

Source§

impl NdIndex<Dim<IxDynImpl>> for [usize; 0]

Source§

impl NdIndex<Dim<IxDynImpl>> for [usize; 1]

Source§

impl NdIndex<Dim<IxDynImpl>> for [usize; 2]

Source§

impl NdIndex<Dim<IxDynImpl>> for [usize; 3]

Source§

impl NdIndex<Dim<IxDynImpl>> for [usize; 4]

Source§

impl NdIndex<Dim<IxDynImpl>> for [usize; 5]

Source§

impl NdIndex<Dim<IxDynImpl>> for [usize; 6]

Source§

impl NdIndex<Dim<[usize; 0]>> for ()

Source§

impl NdIndex<Dim<[usize; 0]>> for [usize; 0]

Source§

impl NdIndex<Dim<[usize; 1]>> for usize

Source§

impl NdIndex<Dim<[usize; 1]>> for [usize; 1]

Source§

impl NdIndex<Dim<[usize; 2]>> for (usize, usize)

Source§

impl NdIndex<Dim<[usize; 2]>> for [usize; 2]

Source§

impl NdIndex<Dim<[usize; 3]>> for (usize, usize, usize)

Source§

impl NdIndex<Dim<[usize; 3]>> for [usize; 3]

Source§

impl NdIndex<Dim<[usize; 4]>> for (usize, usize, usize, usize)

Source§

impl NdIndex<Dim<[usize; 4]>> for [usize; 4]

Source§

impl NdIndex<Dim<[usize; 5]>> for (usize, usize, usize, usize, usize)

Source§

impl NdIndex<Dim<[usize; 5]>> for [usize; 5]

Source§

impl NdIndex<Dim<[usize; 6]>> for [usize; 6]

Source§

impl<'a> NdIndex<Dim<IxDynImpl>> for &'a [usize]

Implementors§