(func)
| 160 | ], |
| 161 | ) |
| 162 | def test_unregistered_func(func): |
| 163 | # Wrap a protocol-based encapsulated ndarray |
| 164 | x = EncapsulateNDArray(np.random.default_rng().random((100, 100))) |
| 165 | |
| 166 | # See if Dask holds the array fine |
| 167 | y = da.from_array(x, chunks=(50, 50)) |
| 168 | |
| 169 | # Check if it's an equivalent array |
| 170 | assert_eq(x, y, check_meta=False, check_type=False) |
| 171 | |
| 172 | # Perform two NumPy functions, one on the |
| 173 | # Encapsulated array |
| 174 | xx = func(x) |
| 175 | |
| 176 | # And one on the Dask array holding these |
| 177 | # encapsulated arrays |
| 178 | yy = func(y) |
| 179 | |
| 180 | # Check that they are equivalent arrays. |
| 181 | assert_eq(xx, yy, check_meta=False, check_type=False) |
| 182 | |
| 183 | |
| 184 | def test_non_existent_func(): |
nothing calls this directly
no test coverage detected