Skip to content

Commit a2b235c

Browse files
committed
Update get_pads() types, comments
1 parent cdadc60 commit a2b235c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

xarray/core/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -976,16 +976,16 @@ def to_list(arg):
976976

977977

978978
def get_pads(
979-
dim: Sequence[str],
979+
dim: Sequence[Hashable],
980980
window: Sequence[int],
981981
center: Sequence[bool],
982982
pad: Sequence[bool],
983-
) -> Dict[str, Tuple[int, int]]:
984-
"""Return a mapping from dim to the amount of padding to use at the each end of that dimension
983+
) -> Dict[Hashable, Tuple[int, int]]:
984+
"""The amount of padding to use at the each end of each dimension
985985
986986
Parameters
987987
----------
988-
dim : sequence of str
988+
dim : sequence of str (or hashable)
989989
dimension(s) for pads
990990
window : sequence to int
991991
Size of the window along a given dimension
@@ -996,7 +996,7 @@ def get_pads(
996996
997997
Returns
998998
-------
999-
Dict[str, Tuple[int, int]]
999+
pads: Dict[Hashable, Tuple[int, int]]
10001000
"""
10011001
pads = {}
10021002
for d, win, cent, p in zip(dim, window, center, pad):

0 commit comments

Comments
 (0)