pub fn shift<T>(input: &Array<T>, offsets: &[i32; 4]) -> Array<T> where
T: HasAfEnum,
"Circular shift of values along specified dimension
input
is the input Arrayoffsets
is 4-value tuple that specifies the shift along respective dimensionAn Array with shifted data.
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]); let a_ = shift(&a, &[ 1i32, 1 , 1, 1]); print(& a); print(&_a); print(&a_);
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4