diff --git a/pyclesperanto/_core.py b/pyclesperanto/_core.py index 9af31c85..40f204d5 100644 --- a/pyclesperanto/_core.py +++ b/pyclesperanto/_core.py @@ -126,7 +126,7 @@ def select_backend(backend: str = "opencl") -> str: return f"{BackendManager.get_backend()} selected." -def wait_for_kernel_to_finish(flag: bool = True, device: Device = None): +def wait_for_kernel_to_finish(wait: bool = True, device: Device = None): """Wait for kernel to finish Enforce the system to wait for the kernel to finish before continuing. Introducing a @@ -135,15 +135,15 @@ def wait_for_kernel_to_finish(flag: bool = True, device: Device = None): Parameters ---------- - flag : bool, default = True + wait : bool, default = True if True, wait for kernel to finish device : Device, default = None the device to set the flag. If None, set it to the current device """ if device is None: - get_device().set_wait_to_finish(flag) + get_device().set_wait_to_finish(wait) else: - device.set_wait_to_finish(flag) + device.set_wait_to_finish(wait) def default_initialisation(): diff --git a/pyclesperanto/_interroperability.py b/pyclesperanto/_interroperability.py index 56b63cef..570c1ab0 100644 --- a/pyclesperanto/_interroperability.py +++ b/pyclesperanto/_interroperability.py @@ -78,12 +78,12 @@ def affine_transform( ) -def set_wait_for_kernel_finish(bool=True): +def set_wait_for_kernel_finish(wait: bool = True): warnings.warn( "set_wait_for_kernel_finish : This method is deprecated. Consider using wait_for_kernel_to_finish() instead.", DeprecationWarning, ) - wait_for_kernel_to_finish(bool) + wait_for_kernel_to_finish(wait) def clip(a, a_min, a_max, out=None):