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

Function test_reflect

dask/array/tests/test_overlap.py:163–173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161
162
163def test_reflect():
164 x = np.arange(10)
165 d = da.from_array(x, chunks=(5, 5))
166
167 e = reflect(d, axis=0, depth=2)
168 expected = np.array([1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8])
169 assert_eq(e, expected)
170
171 e = reflect(d, axis=0, depth=1)
172 expected = np.array([0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9])
173 assert_eq(e, expected)
174
175
176def test_nearest():

Callers

nothing calls this directly

Calls 3

reflectFunction · 0.90
assert_eqFunction · 0.90
arangeMethod · 0.45

Tested by

no test coverage detected