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

Function test_asarray_tuplesafe

xarray/tests/test_indexes.py:27–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def test_asarray_tuplesafe() -> None:
28 res = _asarray_tuplesafe(("a", 1))
29 assert isinstance(res, np.ndarray)
30 assert res.ndim == 0
31 assert res.item() == ("a", 1)
32
33 res = _asarray_tuplesafe([(0,), (1,)])
34 assert res.shape == (2,)
35 assert res[0] == (0,)
36 assert res[1] == (1,)
37
38
39class CustomIndex(Index):

Callers

nothing calls this directly

Calls 1

_asarray_tuplesafeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…