Skip to content

Commit

Permalink
Fix Range1 use (0.3 deprecation)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonster committed May 5, 2015
1 parent f457e80 commit 0aaea20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lasso.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Base.nnz(x::SparseCoefficients) = length(x.coef)
Base.getindex{T}(x::SparseCoefficients{T}, ipred::Int) =
x.predictor2coef[ipred] == 0 ? zero(T) : x.coef[x.predictor2coef[ipred]]

function Base.setindex!{T}(A::Matrix{T}, coef::SparseCoefficients, rg::Range1{Int}, i::Int)
function Base.setindex!{T}(A::Matrix{T}, coef::SparseCoefficients, rg::UnitRange{Int}, i::Int)
A[:, i] = zero(T)
for icoef = 1:nnz(coef)
A[rg[coef.coef2predictor[icoef]], i] = coef.coef[icoef]
Expand Down

0 comments on commit 0aaea20

Please sign in to comment.