Skip to content

Commit

Permalink
docs: update coords_increasing check docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
agriffit committed Aug 16, 2023
1 parent 4c98816 commit 0518923
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/scores/probability/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@


def coords_increasing(da: xr.DataArray, dim: str):
"""
"""Checks if coordinates in a given DataArray are increasing.
Note: No in-built raise if `dim` is not a dimension of `da`.
Args:
da (xr.DataArray): Input data
dim (str): Dimension to check if increasing
Returns:
(bool): True of False based on if the coordinates along the specified
dimension are increasing. No in-built raise if `dim` is not a dimension of `da`.
(bool): Returns True if coordinates along `dim` dimension of
`da` are increasing, False otherwise.
"""
result = (da[dim].diff(dim) > 0).all()
return result
Expand Down

0 comments on commit 0518923

Please sign in to comment.