Skip to content

Commit

Permalink
Aggressive constprop in norm (#54523)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub authored May 20, 2024
1 parent c8a47d6 commit 25227c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/LinearAlgebra/src/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ julia> norm(hcat(v,v), Inf) == norm(vcat(v,v), Inf) != norm([v,v], Inf)
true
```
"""
function norm(itr, p::Real=2)
Base.@constprop :aggressive function norm(itr, p::Real=2)
isempty(itr) && return float(norm(zero(eltype(itr))))
if p == 2
return norm2(itr)
Expand Down

0 comments on commit 25227c1

Please sign in to comment.