Skip to content

Fixed all_true and any_true function calling other clib functions #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def all_true_all(arr: AFArray, /) -> complex:
"""
real = ctypes.c_double(0)
imag = ctypes.c_double(0)
call_from_clib(all_true.__name__, ctypes.pointer(real), ctypes.pointer(imag), arr)
call_from_clib(all_true_all.__name__, ctypes.pointer(real), ctypes.pointer(imag), arr)
return real.value if imag.value == 0 else real.value + imag.value * 1j


Expand All @@ -40,7 +40,7 @@ def any_true(arr: AFArray, dim: int, /) -> AFArray:
source: https://arrayfire.org/docs/group__reduce__func__any__true.htm#ga7c275cda2cfc8eb0bd20ea86472ca0d5
"""
out = AFArray.create_null_pointer()
call_from_clib(all_true.__name__, ctypes.pointer(out), arr, dim)
call_from_clib(any_true.__name__, ctypes.pointer(out), arr, dim)
return out


Expand All @@ -50,7 +50,7 @@ def any_true_all(arr: AFArray, /) -> int | float | bool | complex:
"""
real = ctypes.c_double(0)
imag = ctypes.c_double(0)
call_from_clib(all_true.__name__, ctypes.pointer(real), ctypes.pointer(imag), arr)
call_from_clib(any_true_all.__name__, ctypes.pointer(real), ctypes.pointer(imag), arr)
return real.value if imag.value == 0 else real.value + imag.value * 1j


Expand Down