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

Function test_clip

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

Source from the content-addressed store, hash-verified

315
316
317def test_clip():
318 x = np.random.normal(0, 10, size=(10, 10))
319 d = da.from_array(x, chunks=(3, 4))
320
321 assert_eq(x.clip(5), d.clip(5))
322 assert_eq(x.clip(1, 5), d.clip(1, 5))
323 assert_eq(x.clip(min=5), d.clip(min=5))
324 assert_eq(x.clip(max=5), d.clip(max=5))
325 assert_eq(x.clip(max=1, min=5), d.clip(max=1, min=5))
326 assert_eq(x.clip(min=1, max=5), d.clip(min=1, max=5))
327
328
329def 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