MCPcopy
hub / github.com/pydata/xarray / test_split_empty

Function test_split_empty

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

Source from the content-addressed store, hash-verified

2960
2961
2962def test_split_empty(dtype) -> None:
2963 values = xr.DataArray([], dims=["X"]).astype(dtype)
2964 expected = xr.DataArray(np.zeros((0, 0)), dims=["X", "ZZ"]).astype(dtype)
2965
2966 res = values.str.split(sep=", ", dim="ZZ")
2967
2968 assert res.dtype == expected.dtype
2969 assert_equal(res, expected)
2970
2971
2972def test_get_dummies(dtype) -> None:

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
splitMethod · 0.80
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…