Skip to content

Commit 456b9ae

Browse files
committed
Fix undefined variable
Fixes #11
1 parent 65d8955 commit 456b9ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GLMNet.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function show(io::IO, g::GLMNetPath)
195195
print(io, CoefTable(Union{Vector{Int},Vector{Float64}}[nactive(g.betas), g.dev_ratio, g.lambda], ["df", "pct_dev", "λ"], []))
196196
end
197197

198-
function check_jerr(jerr, maxit)
198+
function check_jerr(jerr, maxit, pmax)
199199
if 0 < jerr < 7777
200200
error("glmnet: memory allocation error")
201201
elseif jerr == 7777
@@ -205,7 +205,7 @@ function check_jerr(jerr, maxit)
205205
elseif -10001 < jerr < 0
206206
@warn("glmnet: convergence for $(-jerr)th lambda value not reached after $maxit iterations")
207207
elseif jerr < -10000
208-
@warn("glmnet: number of non-zero coefficients along path exceeds $nx at $(maxit+10000)th lambda value")
208+
@warn("glmnet: number of non-zero coefficients along path exceeds $pmax at $(maxit+10000)th lambda value")
209209
end
210210
end
211211

@@ -241,7 +241,7 @@ end
241241

242242
macro check_and_return()
243243
esc(quote
244-
check_jerr(jerr[1], maxit)
244+
check_jerr(jerr[1], maxit, pmax)
245245

246246
lmu = lmu[1]
247247
# first lambda is infinity; changed to entry point

0 commit comments

Comments
 (0)