From 869d74f4c52faf49859a0504f01011e52137c214 Mon Sep 17 00:00:00 2001 From: JanukanS Date: Sun, 24 Nov 2024 20:07:04 -0700 Subject: [PATCH 1/2] Described default centre argument behaviour in rolling functions. --- xarray/core/dataarray.py | 3 ++- xarray/core/dataset.py | 3 ++- xarray/core/rolling.py | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index eae11c0c491..3da3a4097e9 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -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. diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index e80ce5fa64a..0d292fb9b03 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -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. diff --git a/xarray/core/rolling.py b/xarray/core/rolling.py index cb16c3723ca..4d921c081be 100644 --- a/xarray/core/rolling.py +++ b/xarray/core/rolling.py @@ -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 ------- @@ -790,7 +791,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 ------- From 190ca46184570a6b27e6729611000afc8965faba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 03:14:15 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- xarray/core/dataarray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index 3da3a4097e9..f989990bbd4 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -7081,7 +7081,7 @@ 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. The default, False, + 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``. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy