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

Function test_unregistered_func

dask/array/tests/test_array_function.py:165–184  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

EncapsulateNDArrayClass · 0.90
assert_eqFunction · 0.90
funcFunction · 0.70
randomMethod · 0.45

Tested by

no test coverage detected