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

Function test_moveaxis_rollaxis_numpy_api

dask/array/tests/test_routines.py:187–195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185
186
187def test_moveaxis_rollaxis_numpy_api():
188 a = da.random.default_rng().random((4, 4, 4), chunks=2)
189 result = np.moveaxis(a, 2, 0)
190 assert isinstance(result, da.Array)
191 assert_eq(result, np.moveaxis(a.compute(), 2, 0))
192
193 result = np.rollaxis(a, 2, 0)
194 assert isinstance(result, da.Array)
195 assert_eq(result, np.rollaxis(a.compute(), 2, 0))
196
197
198@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
randomMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected