Skip to content

Commit

Permalink
make sure min(A) and max(A) reductions are all consistent with reduce…
Browse files Browse the repository at this point in the history
…(max, A)

for #4235
  • Loading branch information
JeffBezanson committed Sep 10, 2013
1 parent 748f086 commit 496bb82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 496bb82

Please sign in to comment.