Skip to content

Commit

Permalink
[docstrings]
Browse files Browse the repository at this point in the history
  • Loading branch information
gph82 committed Jan 11, 2025
1 parent 9b92c9b commit c62e1b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mdciao/plots/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def plot_w_smoothing_auto(y, ax=None, label=None, color=None, x=None, background
r"""
A wrapper around :obj:`matplotlib.pyplot.plot` that allows
to add a smoothing window (or not). See
:obj:`window_average_fast` for more details
:obj:`mdciao.utils.lists.window_average_fast` for more details
Parameters
----------
Expand Down
9 changes: 5 additions & 4 deletions mdciao/utils/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,15 @@ def unique_list_of_iterables_by_tuple_hashing(ilist, return_idxs=False,

def window_average_fast(input_array_y, half_window_size=2):
"""
Returns the moving average using np.convolve
Returns the moving average using :obj:`numpy.convolve`
Parameters
----------
input_array_y : array
numpy array for which moving average should be calculated
numpy array for which moving average should be calculated
half_window_size : int
the actual window size will be 2 * half_window_size + 1.
Example- when half window size = 2, moving average calculation will use window=5
the actual window size will be 2 * half_window_size + 1.
Example- when half window size = 2, moving average calculation will use window=5
Returns
-------
array
Expand Down

0 comments on commit c62e1b4

Please sign in to comment.