Skip to content

Commit

Permalink
Fix deprecations (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
femtocleaner[bot] authored and andreasnoack committed Aug 30, 2018
1 parent f3393bf commit b5e5cb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions perf/glm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ using GLM, DataFrames, StatsFuns
glm(@formula(y ~ 1), DataFrame(y = float(bitrand(10))), Bernoulli())

n = 2_500_000
srand(1234321)
Random.seed!(1234321)
const df2 = DataFrame(x1 = rand(Normal(), n),
x2 = rand(Exponential(), n),
ss = pool(rand(DiscreteUniform(50), n)));
const mf = ModelFrame(@formula(x1 ~ x1 + x2 + ss), df2)
const mm = ModelMatrix(mf)
const β = unshift!(rand(Normal(),52), 0.5); # "true" parameter values
const β = pushfirst!(rand(Normal(),52), 0.5); # "true" parameter values

## Create linear predictor and mean response

Expand Down
4 changes: 2 additions & 2 deletions src/glmfit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ function StatsBase.fit!(m::AbstractGLM, y; wts=nothing, offset=nothing, dofit::B
r = m.rr
V = typeof(r.y)
r.y = copy!(r.y, y)
isa(wts, Void) || copy!(r.wts, wts)
isa(offset, Void) || copy!(r.offset, offset)
isa(wts, Nothing) || copy!(r.wts, wts)
isa(offset, Nothing) || copy!(r.offset, offset)
initialeta!(r.eta, r.d, r.l, r.y, r.wts, r.offset)
updateμ!(r, r.eta)
fill!(m.pp.beta0, 0)
Expand Down

0 comments on commit b5e5cb2

Please sign in to comment.