[][src]Function arrayfire::index

pub fn index<IO, T>(input: &Array<IO>, seqs: &[Seq<T>]) -> Array<IO> where
    c_double: From<T>,
    IO: HasAfEnum,
    T: Copy + HasAfEnum + IndexableType

Indexes the input Array using seqs Sequences

Examples

use arrayfire::{Dim4, Seq, index, randu, print};
let dims = Dim4::new(&[5, 5, 1, 1]);
let a = randu::<f32>(dims);
let seqs = &[Seq::new(1.0, 3.0, 1.0), Seq::default()];
let sub  = index(&a, seqs);
println!("a(seq(1, 3, 1), span)");
print(&sub);