rms#

pyCGM2.Math.numeric.rms(x: ndarray, axis: int | None = None) ndarray#

Calculate the root mean square (RMS) along a specified axis of an array.

The RMS is a measure of the magnitude of a set of numbers. It is the square root of the arithmetic mean of the squares of the original values. This function is often used in signal processing to quantify the variation of a signal.

Parameters:
  • x (np.ndarray) – The input array for which the RMS is calculated.

  • axis (Optional[int]) – The axis along which to compute the RMS. If None, the RMS is computed over the entire array. If axis is 0, RMS is computed column-wise. If axis is 1, RMS is computed row-wise.

Returns:

np.ndarray – An array containing the RMS values. The shape of the output depends on the input array and the axis parameter.