From cc8a9faab636a597d996f208b22be7227de64ac1 Mon Sep 17 00:00:00 2001 From: Ashwin Srinath Date: Fri, 3 Jan 2025 13:52:19 -0500 Subject: [PATCH] Fix how we check for zero-element arrays --- python/cuda_parallel/cuda/parallel/experimental/_utils/cai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cuda_parallel/cuda/parallel/experimental/_utils/cai.py b/python/cuda_parallel/cuda/parallel/experimental/_utils/cai.py index c560bf13a08..bd29906c092 100644 --- a/python/cuda_parallel/cuda/parallel/experimental/_utils/cai.py +++ b/python/cuda_parallel/cuda/parallel/experimental/_utils/cai.py @@ -31,7 +31,7 @@ def is_contiguous(arr: DeviceArrayLike) -> bool: if strides is None: return True - if sum(shape) == 0: + if any(dim == 0 for dim in shape): # array has no elements return True