From 496bb82497e67edb357dc6a8dd9ce2136cb5d391 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 10 Sep 2013 18:24:56 -0400 Subject: [PATCH] make sure min(A) and max(A) reductions are all consistent with reduce(max, A) for #4235 --- base/abstractarray.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 432aaded0d63c..a0775c87ada7d 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1492,7 +1492,7 @@ function prod{T}(A::AbstractArray{T}) v end -function min(A::AbstractArray) +function min{T<:Real}(A::AbstractArray{T}) if isempty(A); error("min: argument is empty"); end v = A[1] for i=2:length(A) @@ -1504,7 +1504,7 @@ function min(A::AbstractArray) v end -function max(A::AbstractArray) +function max{T<:Real}(A::AbstractArray{T}) if isempty(A); error("max: argument is empty"); end v = A[1] for i=2:length(A)