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

Function rows

src/core/index.rs:321–330  ·  view source on GitHub ↗

Get an Array with all rows from `first` to `last` in the `input` Array

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

Source from the content-addressed store, hash-verified

319
320/// Get an Array with all rows from `first` to `last` in the `input` Array
321pub fn rows<T>(input: &Array<T>, first: i64, last: i64) -> Array<T>
322where
323 T: HasAfEnum,
324{
325 let step: f64 = if first > last && last < 0 { -1.0 } else { 1.0 };
326 index(
327 input,
328 &[Seq::new(first as f64, last as f64, step), Seq::default()],
329 )
330}
331
332/// Set rows from `first` to `last` in `inout` Array with rows from Array `new_rows`
333pub fn set_rows<T>(inout: &mut Array<T>, new_rows: &Array<T>, first: i64, last: i64)

Callers 1

get_rowsFunction · 0.85

Calls 1

indexFunction · 0.85

Tested by 1

get_rowsFunction · 0.68