Skip to content

Commit

Permalink
Fix julia 0.5 deprecation warnings
Browse files Browse the repository at this point in the history
(cherry picked from commit d799e8e)
  • Loading branch information
davidanthoff authored and ararslan committed Aug 9, 2016
1 parent 3bbaf7b commit f0b1293
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/samplers/vonmises.jl
Expand Up @@ -17,7 +17,7 @@ end
# (Applied Statistics), 28(2), 152-157.
function rand(s::VonMisesSampler)
f = 0.0
x::Float64
local x::Float64
if s.κ > 700.0
x = s.μ + randn() / sqrt(s.κ)
else
Expand Down
4 changes: 2 additions & 2 deletions src/testutils.jl
Expand Up @@ -173,8 +173,8 @@ function test_samples(s::Sampleable{Univariate, Continuous}, # the sampleable
vmin = minimum(distr)
vmax = maximum(distr)

rmin::Float64
rmax::Float64
local rmin::Float64
local rmax::Float64
if applicable(quantile, distr, 0.5)
rmin = quantile(distr, 0.01)
rmax = quantile(distr, 0.99)
Expand Down
2 changes: 1 addition & 1 deletion src/truncated/normal.jl
Expand Up @@ -79,7 +79,7 @@ end
# - Available at http://arxiv.org/abs/0907.4010

function randnt(lb::Float64, ub::Float64, tp::Float64)
r::Float64
local r::Float64
if tp > 0.3 # has considerable chance of falling in [lb, ub]
r = randn()
while r < lb || r > ub
Expand Down

0 comments on commit f0b1293

Please sign in to comment.