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

Function slices

src/core/index.rs:434–445  ·  view source on GitHub ↗

Get slices from `first` to `last` in `input` Array Slices indicate that the indexing is along 3rd dimension

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

Source from the content-addressed store, hash-verified

432///
433/// Slices indicate that the indexing is along 3rd dimension
434pub fn slices<T>(input: &Array<T>, first: i64, last: i64) -> Array<T>
435where
436 T: HasAfEnum,
437{
438 let step: f64 = if first > last && last < 0 { -1.0 } else { 1.0 };
439 let seqs = [
440 Seq::default(),
441 Seq::default(),
442 Seq::new(first as f64, last as f64, step),
443 ];
444 index(input, &seqs)
445}
446
447/// Set `first` to `last` slices of `inout` Array to a new Array `new_slices`
448///

Callers

nothing calls this directly

Calls 1

indexFunction · 0.85

Tested by

no test coverage detected