From 1e28c6fdc0550fc505d2f4e27bbe310768129563 Mon Sep 17 00:00:00 2001 From: Amanda Potts Date: Fri, 15 Nov 2024 16:32:52 -0500 Subject: [PATCH] Closes #3864 max and min of bool to return bool like numpy --- src/ReductionMsg.chpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ReductionMsg.chpl b/src/ReductionMsg.chpl index 7b3311eb42..c8b594ab9a 100644 --- a/src/ReductionMsg.chpl +++ b/src/ReductionMsg.chpl @@ -92,7 +92,7 @@ module ReductionMsg } @arkouda.registerCommand - proc maxAll(const ref x:[?d] ?t, skipNan: bool): reductionReturnType(t) throws + proc maxAll(const ref x:[?d] ?t, skipNan: bool): t throws where t==int || t==real || t==uint(64) || t==bool { use SliceReductionOps; @@ -100,10 +100,10 @@ module ReductionMsg } @arkouda.registerCommand - proc max(const ref x:[?d] ?t, axis: list(int), skipNan: bool): [] reductionReturnType(t) throws + proc max(const ref x:[?d] ?t, axis: list(int), skipNan: bool): [] t throws where t==int || t==real || t==uint(64) || t==bool { use SliceReductionOps; - type opType = reductionReturnType(t); + type opType = t; const (valid, axes) = validateNegativeAxes(axis, x.rank); if !valid { throw new Error("Invalid axis value(s) '%?' in slicing reduction".format(axis)); @@ -117,7 +117,7 @@ module ReductionMsg } @arkouda.registerCommand - proc minAll(const ref x:[?d] ?t, skipNan: bool): reductionReturnType(t) throws + proc minAll(const ref x:[?d] ?t, skipNan: bool): t throws where t==int || t==real || t==uint(64) || t==bool { use SliceReductionOps; @@ -125,10 +125,10 @@ module ReductionMsg } @arkouda.registerCommand - proc min(const ref x:[?d] ?t, axis: list(int), skipNan: bool): [] reductionReturnType(t) throws + proc min(const ref x:[?d] ?t, axis: list(int), skipNan: bool): [] t throws where t==int || t==real || t==uint(64) || t==bool { use SliceReductionOps; - type opType = reductionReturnType(t); + type opType = t; const (valid, axes) = validateNegativeAxes(axis, x.rank); if !valid { throw new Error("Invalid axis value(s) '%?' in slicing reduction".format(axis));