Skip to content

Commit

Permalink
Described default centre argument behaviour in rolling functions (#9819)
Browse files Browse the repository at this point in the history
* Described default centre argument behaviour in rolling functions.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
JanukanS and pre-commit-ci[bot] authored Nov 26, 2024
1 parent dafcde2 commit 1317337
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -7081,7 +7081,8 @@ def rolling(
(otherwise result is NA). The default, None, is equivalent to
setting min_periods equal to the size of the window.
center : bool or Mapping to int, default: False
Set the labels at the center of the window.
Set the labels at the center of the window. The default, False,
sets the labels at the right edge of the window.
**window_kwargs : optional
The keyword arguments form of ``dim``.
One of dim or window_kwargs must be provided.
Expand Down
3 changes: 2 additions & 1 deletion xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -10728,7 +10728,8 @@ def rolling(
(otherwise result is NA). The default, None, is equivalent to
setting min_periods equal to the size of the window.
center : bool or Mapping to int, default: False
Set the labels at the center of the window.
Set the labels at the center of the window. The default, False,
sets the labels at the right edge of the window.
**window_kwargs : optional
The keyword arguments form of ``dim``.
One of dim or window_kwargs must be provided.
Expand Down
6 changes: 4 additions & 2 deletions xarray/core/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ def __init__(
(otherwise result is NA). The default, None, is equivalent to
setting min_periods equal to the size of the window.
center : bool, default: False
Set the labels at the center of the window.
Set the labels at the center of the window. The default, False,
sets the labels at the right edge of the window.
Returns
-------
Expand Down Expand Up @@ -793,7 +794,8 @@ def __init__(
(otherwise result is NA). The default, None, is equivalent to
setting min_periods equal to the size of the window.
center : bool or mapping of hashable to bool, default: False
Set the labels at the center of the window.
Set the labels at the center of the window. The default, False,
sets the labels at the right edge of the window.
Returns
-------
Expand Down

0 comments on commit 1317337

Please sign in to comment.