MCPcopy Index your code
hub / github.com/pydata/xarray / test_where

Function test_where

xarray/tests/test_computation.py:2194–2198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2192
2193
2194def test_where() -> None:
2195 cond = xr.DataArray([True, False], dims="x")
2196 actual = xr.where(cond, 1, 0)
2197 expected = xr.DataArray([1, 0], dims="x")
2198 assert_identical(expected, actual)
2199
2200
2201def test_where_attrs() -> None:

Callers

nothing calls this directly

Calls 2

assert_identicalFunction · 0.70
whereMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…