From 1851b15090370971128698a54aab9b1974509a0c Mon Sep 17 00:00:00 2001 From: Edwin Solis Date: Sat, 7 Jun 2025 22:26:21 -0700 Subject: [PATCH] Fixed all_true and any_true function calling other clib functions --- .../lib/vector_algorithms/reduction_operations.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arrayfire_wrapper/lib/vector_algorithms/reduction_operations.py b/arrayfire_wrapper/lib/vector_algorithms/reduction_operations.py index 3f25e96..5e516bb 100644 --- a/arrayfire_wrapper/lib/vector_algorithms/reduction_operations.py +++ b/arrayfire_wrapper/lib/vector_algorithms/reduction_operations.py @@ -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 @@ -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 @@ -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