Trait extendr_api::prelude::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§