Skip to content

Commit 30431b4

Browse files
authored
Merge pull request #616 from danielwe/redundantnorm
Eliminate redundant call to `norm`
2 parents 3b3791f + 321f626 commit 30431b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRules"
22
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
3-
version = "1.30.0"
3+
version = "1.31.0"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/rulesets/LinearAlgebra/norm.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
function frule((_, Δx), ::typeof(norm), x)
66
y = norm(x)
7-
return y, _norm2_forward(x, Δx, norm(x))
7+
return y, _norm2_forward(x, Δx, y)
88
end
99

1010
function frule((_, ẋ), ::typeof(norm), x::Number, p::Real)

0 commit comments

Comments
 (0)