Skip to content

Commit 5d4ca9a

Browse files
committed
test any
1 parent 33789f6 commit 5d4ca9a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_proc/test_aggregate.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import numpy.testing as npt
77
import pytest
88

9+
import dascore
910
import dascore as dc
1011
from dascore.exceptions import ParameterError
1112
from dascore.proc.aggregate import _AGG_FUNCS
@@ -89,6 +90,12 @@ def test_dim_reduce_distance(self, random_patch):
8990
expected = np.var(random_patch.get_array("distance"))
9091
assert out.get_coord("distance").values == expected
9192

93+
def test_any(self, random_patch):
94+
"""Ensure any works."""
95+
out = (random_patch > 0.5).any(dim="time")
96+
assert isinstance(out, dascore.Patch)
97+
assert np.issubdtype(out.dtype, np.bool_)
98+
9299

93100
class TestApplyOperators:
94101
"""Ensure aggregated patches can be used as operators for arithmetic."""

0 commit comments

Comments
 (0)