[][src]Function arrayfire::assign_seq

pub fn assign_seq<T: Copy, I>(
    lhs: &Array<I>,
    seqs: &[Seq<T>],
    rhs: &Array<I>
) -> Array<I> where
    c_double: From<T>,
    I: HasAfEnum

Assign(copy) content of an Array to another Array indexed by Sequences

Assign rhs to lhs after indexing lhs

Examples

use arrayfire::{constant, Dim4, Seq, assign_seq, print};
let a    = constant(2.0 as f32, Dim4::new(&[5, 3, 1, 1]));
let b    = constant(1.0 as f32, Dim4::new(&[3, 3, 1, 1]));
let seqs = &[Seq::new(1.0, 3.0, 1.0), Seq::default()];
let sub  = assign_seq(&a, seqs, &b);
print(&a);
// 2.0 2.0 2.0
// 2.0 2.0 2.0
// 2.0 2.0 2.0
// 2.0 2.0 2.0
// 2.0 2.0 2.0

print(&sub);
// 2.0 2.0 2.0
// 1.0 1.0 1.0
// 1.0 1.0 1.0
// 1.0 1.0 1.0
// 2.0 2.0 2.0