Assign an Array to another after indexing it using any combination of Array's and Sequence's # Examples ```rust use arrayfire::{Array, Dim4, Seq, print, randu, constant, Indexer, assign_gen}; let values: [f32; 3] = [1.0, 2.0, 3.0]; let indices = Array::new(&values, Dim4::new(&[3, 1, 1, 1])); let seq4gen = Seq::new(0.0, 2.0, 1.0); let mut a = randu:: (Dim4::new(&[5, 3, 1, 1])); // [5 3 1 1] /
(lhs: &mut Array<T>, indices: &Indexer, rhs: &Array<T>)
| 611 | /// // 0.5328 0.9347 0.0535 |
| 612 | /// ``` |
| 613 | pub fn assign_gen<T>(lhs: &mut Array<T>, indices: &Indexer, rhs: &Array<T>) |
| 614 | where |
| 615 | T: HasAfEnum, |
| 616 | { |
| 617 | unsafe { |
| 618 | let mut temp: af_array = std::ptr::null_mut(); |
| 619 | let err_val = af_assign_gen( |
| 620 | &mut temp as *mut af_array, |
| 621 | lhs.get() as af_array, |
| 622 | indices.len() as dim_t, |
| 623 | indices.get() as af_index_t, |
| 624 | rhs.get() as af_array, |
| 625 | ); |
| 626 | HANDLE_ERROR(AfError::from(err_val)); |
| 627 | |
| 628 | let modified = temp.into(); |
| 629 | let _old_arr = mem::replace(lhs, modified); |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | #[repr(C)] |
| 634 | struct SeqInternal { |