integral¶
- integral(x, y, /, y0=0, axis=0)[source]¶
Return the integral approximation along an arbitrary axis.
- Parameters
x (array-like) – A 1-d coordinate vector. Must match the shape of
y
on axisaxis
.y (array-like) – The data.
y0 (float or array-like, optional) – Constant offset added to the integral. Must be scalar or match the shape of
y
.axis (int, optional) – Axis along which integral is taken.
dim (str, optional) – For `xarray.DataArray` input only. Named dimension along which integral is taken.
- Returns
array-like – The “integral”.