MCPcopy Index your code
hub / github.com/dask/dask / test_divmod

Function test_divmod

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

Source from the content-addressed store, hash-verified

473
474
475def test_divmod():
476 arr1 = np.random.randint(1, 100, size=(20, 20))
477 arr2 = np.random.randint(1, 100, size=(20, 20))
478
479 darr1 = da.from_array(arr1, 3)
480 darr2 = da.from_array(arr2, 3)
481
482 result = np.divmod(darr1, 2.0)
483 expected = np.divmod(arr1, 2.0)
484 assert_eq(result[0], expected[0])
485 assert_eq(result[1], expected[1])
486
487 result = np.divmod(darr1, darr2)
488 expected = np.divmod(arr1, arr2)
489 assert_eq(result[0], expected[0])
490 assert_eq(result[1], expected[1])
491
492 result = divmod(darr1, 2.0)
493 expected = divmod(arr1, 2.0)
494 assert_eq(result[0], expected[0])
495 assert_eq(result[1], expected[1])
496
497 result = divmod(darr1, darr2)
498 expected = divmod(arr1, arr2)
499 assert_eq(result[0], expected[0])
500 assert_eq(result[1], expected[1])
501
502
503@pytest.mark.parametrize("dt", ["float64", "float32", "int32", "int64"])

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
divmodFunction · 0.50
randintMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…