Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Apr 9, 2019
1 parent d8fbf33 commit 8ef0ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/LinearAlgebra/src/dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function diagm(kv::Pair{<:Integer,<:AbstractVector}...; size::Union{Nothing,Tupl
end
function diagm_size(size::Union{Nothing,Tuple{<:Integer,<:Integer}}, kv::Pair{<:Integer,<:AbstractVector}...)
if isnothing(size)
mnmax = mapreduce(x -> length(x.second) + abs(Int(x.first)), max, kv)
mnmax = mapreduce(x -> length(x.second) + abs(Int(x.first)), max, kv; init=0)
return mnmax, mnmax
else
mmax = mapreduce(x -> length(x.second) - min(0,Int(x.first)), max, kv; init=0)
Expand Down

0 comments on commit 8ef0ad1

Please sign in to comment.