Skip to content

Commit

Permalink
Merge pull request JuliaLang#20 from karbarcca/patch-1
Browse files Browse the repository at this point in the history
`range` and `midrange` were throwing undefined errors because of an argu...
  • Loading branch information
johnmyleswhite committed Aug 12, 2013
2 parents 32b8504 + 61098a3 commit 2a9e325
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scalar_stats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ end


# Mid-range
function midrange{T<:Real}(x::AbstractArray{T})
function midrange{T<:Real}(a::AbstractArray{T})
xmin, xmax = minmax(a)
return xmin + (xmax - xmin) / 2
end

# Range: xmax - xmin
function range{T<:Real}(x::AbstractArray{T})
function range{T<:Real}(a::AbstractArray{T})
xmin, xmax = minmax(a)
return xmax - xmin
end
Expand Down

0 comments on commit 2a9e325

Please sign in to comment.