rampedpyrox.derivatize

rampedpyrox.derivatize(num, denom)[source]

Method for derivatizing numerator, num, with respect to denominator, denom.

Parameters:
  • num (int or array-like) – The numerator of the numerical derivative function.
  • denom (array-like) – The denominator of the numerical derivative function. Length n.
Returns:

derivative – An np.ndarray instance of the derivative. Length n.

Return type:

rparray

Raises:

ArrayError – If denom is not array-like.

See also

numpy.gradient()
The method used to calculate derivatives

Notes

This method uses the np.gradient method to calculate derivatives. If denom is a scalar, resulting array will be all np.inf. If both num and denom are scalars, resulting array will be all np.nan. If either num or denom are 1d and the other is 2d, derivative will be calculated column-wise. If both are 2d, each column will be derivatized separately.