MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / cols

Function cols

src/core/index.rs:380–389  ·  view source on GitHub ↗

Get all cols from `first` to `last` in the `input` Array

(input: &Array<T>, first: i64, last: i64)

Source from the content-addressed store, hash-verified

378
379/// Get all cols from `first` to `last` in the `input` Array
380pub fn cols<T>(input: &Array<T>, first: i64, last: i64) -> Array<T>
381where
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`
392pub fn set_cols<T>(inout: &mut Array<T>, new_cols: &Array<T>, first: i64, last: i64)

Callers 1

get_rowsFunction · 0.85

Calls 1

indexFunction · 0.85

Tested by 1

get_rowsFunction · 0.68