Get all cols from `first` to `last` in the `input` Array
(input: &Array<T>, first: i64, last: i64)
| 378 | |
| 379 | /// Get all cols from `first` to `last` in the `input` Array |
| 380 | pub fn cols<T>(input: &Array<T>, first: i64, last: i64) -> Array<T> |
| 381 | where |
| 382 | T: HasAfEnum, |
| 383 | { |
| 384 | let step: f64 = if first > last && last < 0 { -1.0 } else { 1.0 }; |
| 385 | index( |
| 386 | input, |
| 387 | &[Seq::default(), Seq::new(first as f64, last as f64, step)], |
| 388 | ) |
| 389 | } |
| 390 | |
| 391 | /// Set cols from `first` to `last` in `inout` Array with cols from Array `new_cols` |
| 392 | pub fn set_cols<T>(inout: &mut Array<T>, new_cols: &Array<T>, first: i64, last: i64) |