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

Function test_partition_empty

xarray/tests/test_accessor_str.py:2560–2567  ·  view source on GitHub ↗
(dtype)

Source from the content-addressed store, hash-verified

2558
2559
2560def test_partition_empty(dtype) -> None:
2561 values = xr.DataArray([], dims=["X"]).astype(dtype)
2562 expected = xr.DataArray(np.zeros((0, 0)), dims=["X", "ZZ"]).astype(dtype)
2563
2564 res = values.str.partition(sep=", ", dim="ZZ")
2565
2566 assert res.dtype == expected.dtype
2567 assert_equal(res, expected)
2568
2569
2570@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
partitionMethod · 0.80
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…