pub fn gradient<T>(input: &Array<T>) -> (Array<T>, Array<T>)where
T: HasAfEnum + FloatingPoint,Expand description
Calculate the gradients
The gradients along the first and second dimensions are calculated simultaneously.
§Parameters
inputis the input Array
§Return Values
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.