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

Function test_clip

dask/array/tests/test_ufunc.py:331–340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

329
330
331def test_clip():
332 x = np.random.normal(0, 10, size=(10, 10))
333 d = da.from_array(x, chunks=(3, 4))
334
335 assert_eq(x.clip(5), d.clip(5))
336 assert_eq(x.clip(1, 5), d.clip(1, 5))
337 assert_eq(x.clip(min=5), d.clip(min=5))
338 assert_eq(x.clip(max=5), d.clip(max=5))
339 assert_eq(x.clip(max=1, min=5), d.clip(max=1, min=5))
340 assert_eq(x.clip(min=1, max=5), d.clip(min=1, max=5))
341
342
343def test_angle():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
normalMethod · 0.45
clipMethod · 0.45

Tested by

no test coverage detected