Skip to content

Commit

Permalink
avoid problems with T<:Integer, T!=Int
Browse files Browse the repository at this point in the history
  • Loading branch information
abraunst committed Jan 4, 2019
1 parent 970c64d commit 6f04355
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stdlib/SparseArrays/src/sparsematrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,7 @@ end


function _sprand(r::AbstractRNG, m::Integer, n::Integer, density::AbstractFloat, rfn)
m, n = Int(m), Int(n)
(m < 0 || n < 0) && throw(ArgumentError("invalid Array dimensions"))
0 <= density <= 1 || throw(ArgumentError("$density not in [0,1]"))
j, colm = 1, 0
Expand Down

0 comments on commit 6f04355

Please sign in to comment.