arrayfire / arrayfire-binary-python-wrapper

A python thin wrapper for ArrayFire library
https://arrayfire.com
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

sync() function default value #40

Closed sakchal closed 4 months ago

sakchal commented 5 months ago

The sync function is supposed to take a default device_id value of -1 according to the docs, but I'm forced to pass in an argument when calling the function. I made a PR for a potential fix.

def sync(device_id: int, /) -> None:
    """
    Blocks until all operations on device are finished.

    Parameters
    ----------
    device_id: int
        Id of the target device.
    """
    call_from_clib(sync.__name__, `device_id)
syurkevi commented 4 months ago

Addressed in #41