MCPcopy Create free account
hub / github.com/dask/dask / test_getter

Function test_getter

dask/array/tests/test_array_core.py:2794–2799  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2792
2793@pytest.mark.filterwarnings("ignore:the matrix subclass")
2794def test_getter():
2795 assert type(getter(np.matrix([[1]]), 0)) is np.ndarray
2796 assert type(getter(np.matrix([[1]]), 0, asarray=False)) is np.matrix
2797 assert_eq(getter([1, 2, 3, 4, 5], slice(1, 4)), np.array([2, 3, 4]))
2798
2799 assert_eq(getter(np.arange(5), (None, slice(None, None))), np.arange(5)[None, :])
2800
2801
2802def test_size():

Callers

nothing calls this directly

Calls 3

getterFunction · 0.90
assert_eqFunction · 0.90
arangeMethod · 0.45

Tested by

no test coverage detected