tidy3d.plugins.autograd.functions.trapz#
- class trapz[source]#
Bases:
Integrate along the given axis using the composite trapezoidal rule.
- Parameters:
y (np.ndarray) β Input array to integrate.
x (np.ndarray = None) β The sample points corresponding to the y values. If None, the sample points are assumed to be evenly spaced with spacing dx.
dx (float = 1.0) β The spacing between sample points when x is None. Default is 1.0.
axis (int = -1) β The axis along which to integrate. Default is the last axis.
- Returns:
Definite integral as approximated by the trapezoidal rule.
- Return type:
float
Inherited Common Usage