Skip to content

Commit 4259dfa

Browse files
Remove 'Y' and 'M' from DatetimeUnitOptions (#10306)
1 parent dd6222f commit 4259dfa

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

xarray/core/dataarray.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5446,7 +5446,7 @@ def integrate(
54465446
----------
54475447
coord : Hashable, or sequence of Hashable
54485448
Coordinate(s) used for the integration.
5449-
datetime_unit : {'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', \
5449+
datetime_unit : {'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', \
54505450
'ps', 'fs', 'as', None}, optional
54515451
Specify the unit if a datetime coordinate is used.
54525452
@@ -5503,7 +5503,7 @@ def cumulative_integrate(
55035503
----------
55045504
coord : Hashable, or sequence of Hashable
55055505
Coordinate(s) used for the integration.
5506-
datetime_unit : {'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', \
5506+
datetime_unit : {'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', \
55075507
'ps', 'fs', 'as', None}, optional
55085508
Specify the unit if a datetime coordinate is used.
55095509

xarray/core/dataset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8247,7 +8247,7 @@ def differentiate(
82478247
The coordinate to be used to compute the gradient.
82488248
edge_order : {1, 2}, default: 1
82498249
N-th order accurate differences at the boundaries.
8250-
datetime_unit : None or {"Y", "M", "W", "D", "h", "m", "s", "ms", \
8250+
datetime_unit : None or {"W", "D", "h", "m", "s", "ms", \
82518251
"us", "ns", "ps", "fs", "as", None}, default: None
82528252
Unit to compute gradient. Only valid for datetime coordinate.
82538253
@@ -8315,7 +8315,7 @@ def integrate(
83158315
----------
83168316
coord : hashable, or sequence of hashable
83178317
Coordinate(s) used for the integration.
8318-
datetime_unit : {'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', \
8318+
datetime_unit : {'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', \
83198319
'ps', 'fs', 'as', None}, optional
83208320
Specify the unit if datetime coordinate is used.
83218321
@@ -8439,7 +8439,7 @@ def cumulative_integrate(
84398439
----------
84408440
coord : hashable, or sequence of hashable
84418441
Coordinate(s) used for the integration.
8442-
datetime_unit : {'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', \
8442+
datetime_unit : {'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', \
84438443
'ps', 'fs', 'as', None}, optional
84448444
Specify the unit if datetime coordinate is used.
84458445

xarray/core/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def copy(
254254
InterpOptions = Union[Interp1dOptions, InterpolantOptions, InterpnOptions]
255255

256256
DatetimeUnitOptions = Literal[
257-
"Y", "M", "W", "D", "h", "m", "s", "ms", "us", "μs", "ns", "ps", "fs", "as", None
257+
"W", "D", "h", "m", "s", "ms", "us", "μs", "ns", "ps", "fs", "as", None
258258
]
259259
NPDatetimeUnitOptions = Literal["D", "h", "m", "s", "ms", "us", "ns"]
260260
PDDatetimeUnitOptions = Literal["s", "ms", "us", "ns"]

0 commit comments

Comments
 (0)