()
| 2096 | |
| 2097 | |
| 2098 | def 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 | |
| 2109 | def test_nonzero(): |