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

Function test_flatnonzero

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

Source from the content-addressed store, hash-verified

2096
2097
2098def test_flatnonzero():
2099 for shape, chunks in [(0, ()), ((0, 0), (0, 0)), ((15, 16), (4, 5))]:
2100 x = np.random.default_rng().integers(10, size=shape)
2101 d = da.from_array(x, chunks=chunks)
2102
2103 x_fnz = np.flatnonzero(x)
2104 d_fnz = da.flatnonzero(d)
2105
2106 assert_eq(d_fnz, x_fnz)
2107
2108
2109def test_nonzero():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
integersMethod · 0.45

Tested by

no test coverage detected