Thanks to visit codestin.com
Credit goes to docs.rs

assign_seq

Function assign_seq 

Source
pub fn assign_seq<T, I>(lhs: &mut Array<I>, seqs: &[Seq<T>], rhs: &Array<I>)
Expand description

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 mut a = constant(2.0 as f32, Dim4::new(&[5, 3, 1, 1]));
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

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()];
assign_seq(&mut a, seqs, &b);

print(&a);
// 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