Skip to content

Commit 11a5568

Browse files
committed
add parameters and return to doc strings
1 parent dae9e65 commit 11a5568

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

cmeutils/sampling.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,19 @@ def is_equilibrated(data, threshold_fraction=0.50, threshold_neff=50, nskip=1):
106106

107107

108108
def autocorr1D(array):
109-
"""
110-
Takes in a linear np array, performs autocorrelation
109+
"""Takes in a linear np array, performs autocorrelation
111110
function and returns normalized array with half the length
112-
of the input
111+
of the input.
112+
113+
Parameters
114+
----------
115+
data : numpy.typing.Arraylike, required
116+
1-D series of data to perform autocorrelation on.
117+
118+
Returns
119+
-------
120+
1D np.array
121+
113122
"""
114123
ft = np.fft.rfft(array - np.average(array))
115124
acorr = np.fft.irfft(ft * np.conjugate(ft)) / (len(array) * np.var(array))

0 commit comments

Comments
 (0)