pub fn spatial_gradient(
arr: &XarrayDataArray,
dim: usize,
dx: f64,
) -> XarrayDataArrayExpand description
Compute the finite-difference gradient of an array along dimension dim.
Uses central differences for interior points, one-sided for boundary.
dx is the grid spacing along that dimension.