WrightTools.kit.diff¶
-
WrightTools.kit.
diff
(xi, yi, order=1) → numpy.ndarray[source]¶ Take the numerical derivative of a 1D array.
Output is mapped onto the original coordinates using linear interpolation. Expects monotonic xi values.
- Parameters
xi (1D array-like) – Coordinates.
yi (1D array-like) – Values.
order (positive integer (optional)) – Order of differentiation.
- Returns
Numerical derivative. Has the same shape as the input arrays.
- Return type
1D numpy array