{ } Raw JSON

bundles / scipy 1.18.0 / scipy / _external / array_api_extra / testing / CountingDaskScheduler

class

scipy._external.array_api_extra.testing:CountingDaskScheduler

source: /scipy/_external/array_api_extra/testing.py:445

Signature

class CountingDaskScheduler(max_count: int, msg: str)

Members

Summary

Dask scheduler that counts how many times dask.compute is called.

Extended Summary

If the number of times exceeds 'max_count', it raises an error. This is a wrapper around Dask's own 'synchronous' scheduler.

Parameters

max_count : int

Maximum number of allowed calls to dask.compute.

msg : str

Assertion to raise when the count exceeds max_count.

Aliases

  • scipy.differentiate.xpx.testing.CountingDaskScheduler