Extract `col_num` col from `input` Array # Examples ```rust use arrayfire::{Dim4, randu, col, print}; let dims = Dim4::new(&[5, 5, 1, 1]); let a = randu:: (dims); print(&a); println!("Grab last col of the random matrix"); print(&col(&a, 4)); ```
(input: &Array<T>, col_num: i64)
| 352 | /// print(&col(&a, 4)); |
| 353 | /// ``` |
| 354 | pub fn col<T>(input: &Array<T>, col_num: i64) -> Array<T> |
| 355 | where |
| 356 | T: HasAfEnum, |
| 357 | { |
| 358 | index( |
| 359 | input, |
| 360 | &[ |
| 361 | Seq::default(), |
| 362 | Seq::new(col_num as f64, col_num as f64, 1.0), |
| 363 | ], |
| 364 | ) |
| 365 | } |
| 366 | |
| 367 | /// Set `col_num`^th col in `inout` Array to a new Array `new_col` |
| 368 | pub fn set_col<T>(inout: &mut Array<T>, new_col: &Array<T>, col_num: i64) |