[][src]Function arrayfire::shift

pub fn shift<T>(input: &Array<T>, offsets: &[i32; 4]) -> Array<T> where
    T: HasAfEnum

"Circular shift of values along specified dimension

Parameters

Return Values

An Array with shifted data.

Examples

use arrayfire::{Array, Dim4, print, randu, shift};
let a  = randu::<f32>(Dim4::new(&[5, 1, 1, 1]));
let _a = shift(&a, &[-1i32, 1 , 1, 1]); //shift data one step backward
let a_ = shift(&a, &[ 1i32, 1 , 1, 1]); //shift data one step forward
print(& a);
print(&_a);
print(&a_);