From 329bf5ac13e0546b8f1542f74958d2c7608aabf5 Mon Sep 17 00:00:00 2001 From: Irina Demeshko Date: Thu, 9 Nov 2023 11:16:19 -0800 Subject: [PATCH] Update cunumeric/array.py Co-authored-by: Manolis Papadakis --- cunumeric/array.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cunumeric/array.py b/cunumeric/array.py index f0eb480e5..60e8cf2b2 100644 --- a/cunumeric/array.py +++ b/cunumeric/array.py @@ -3160,7 +3160,7 @@ def mean( if where_array is not None: divisor = where_array._count_nonzero(axis=axis) else: - divisor = self.shape[axis] + divisor = np.array(self.shape[axis]) # Divide by the number of things in the collapsed dimensions # Pick the right kinds of division based on the dtype sum_array = sum_array.astype(dtype)