MCPcopy Create free account
hub / github.com/PyTTaMaster/PyTTa / arr2rms

Function arr2rms

pytta/utils/maths.py:32–45  ·  view source on GitHub ↗

Root of the mean of a squared array. Arguments --------- arr (np.array): Array of data. Returns ------- float: RMS of data.

(arr: np.array)

Source from the content-addressed store, hash-verified

30
31@nb.njit
32def arr2rms(arr: np.array) -> float:
33 """
34 Root of the mean of a squared array.
35
36 Arguments
37 ---------
38 arr (np.array): Array of data.
39
40 Returns
41 -------
42 float: RMS of data.
43
44 """
45 return (np.mean(arr**2))**0.5
46
47
48@nb.njit

Callers 1

arr2dBFunction · 0.85

Calls 1

meanMethod · 0.80

Tested by

no test coverage detected