Skip to content

Commit

Permalink
fix empty list case
Browse files Browse the repository at this point in the history
  • Loading branch information
jlapeyre committed Dec 12, 2014
1 parent 7911579 commit 0c61775
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/PermPlain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ end
function listtosparse{T<:Real}(p::AbstractVector{T})
data = Dict{T,T}()
maxk = zero(T)
length(p) == 0 && return (data,maxk)
for i in p
pv = p[i]
if pv != i
Expand Down

0 comments on commit 0c61775

Please sign in to comment.