Skip to content

Commit

Permalink
Merge pull request #616 from danielwe/redundantnorm
Browse files Browse the repository at this point in the history
Eliminate redundant call to `norm`
  • Loading branch information
mzgubic authored May 13, 2022
2 parents 3b3791f + 321f626 commit 30431b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ChainRules"
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
version = "1.30.0"
version = "1.31.0"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
2 changes: 1 addition & 1 deletion src/rulesets/LinearAlgebra/norm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

function frule((_, Δx), ::typeof(norm), x)
y = norm(x)
return y, _norm2_forward(x, Δx, norm(x))
return y, _norm2_forward(x, Δx, y)
end

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

2 comments on commit 30431b4

@mzgubic
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/60176

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.31.0 -m "<description of version>" 30431b40c832571d4d7a7b4570c94b8bb2c4ed90
git push origin v1.31.0

Please sign in to comment.