pub fn gradient<T>(input: &Array<T>) -> (Array<T>, Array<T>) where
T: HasAfEnum + FloatingPoint,
Calculate the gradients
The gradients along the first and second dimensions are calculated simultaneously.
inputis the input Array
A tuple of Arrays.
The first Array is
dx which is the gradient along the 1st dimension.
The second Array is
dy which is the gradient along the 2nd dimension.