Skip to content

Commit 1317337

Browse files
Described default centre argument behaviour in rolling functions (#9819)
* 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>
1 parent dafcde2 commit 1317337

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

xarray/core/dataarray.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7081,7 +7081,8 @@ def rolling(
70817081
(otherwise result is NA). The default, None, is equivalent to
70827082
setting min_periods equal to the size of the window.
70837083
center : bool or Mapping to int, default: False
7084-
Set the labels at the center of the window.
7084+
Set the labels at the center of the window. The default, False,
7085+
sets the labels at the right edge of the window.
70857086
**window_kwargs : optional
70867087
The keyword arguments form of ``dim``.
70877088
One of dim or window_kwargs must be provided.

xarray/core/dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10728,7 +10728,8 @@ def rolling(
1072810728
(otherwise result is NA). The default, None, is equivalent to
1072910729
setting min_periods equal to the size of the window.
1073010730
center : bool or Mapping to int, default: False
10731-
Set the labels at the center of the window.
10731+
Set the labels at the center of the window. The default, False,
10732+
sets the labels at the right edge of the window.
1073210733
**window_kwargs : optional
1073310734
The keyword arguments form of ``dim``.
1073410735
One of dim or window_kwargs must be provided.

xarray/core/rolling.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ def __init__(
282282
(otherwise result is NA). The default, None, is equivalent to
283283
setting min_periods equal to the size of the window.
284284
center : bool, default: False
285-
Set the labels at the center of the window.
285+
Set the labels at the center of the window. The default, False,
286+
sets the labels at the right edge of the window.
286287
287288
Returns
288289
-------
@@ -793,7 +794,8 @@ def __init__(
793794
(otherwise result is NA). The default, None, is equivalent to
794795
setting min_periods equal to the size of the window.
795796
center : bool or mapping of hashable to bool, default: False
796-
Set the labels at the center of the window.
797+
Set the labels at the center of the window. The default, False,
798+
sets the labels at the right edge of the window.
797799
798800
Returns
799801
-------

0 commit comments

Comments
 (0)