Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #205 from invenia/ox/cr1
Browse files Browse the repository at this point in the history
bump ChainRules compat to v1
  • Loading branch information
oxinabox committed Jul 27, 2021
2 parents 8d3dc2b + 6a10c22 commit 49bf7f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Nabla"
uuid = "49c96f43-aa6d-5a04-a506-44c7070ebe78"
version = "0.13.0"
version = "0.13.1"

[deps]
ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
Expand All @@ -15,14 +15,14 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
ChainRules = "0.8"
ChainRulesCore = "0.10.9"
ChainRules = "0.8, 1"
ChainRulesCore = "0.10.9, 1"
ChainRulesOverloadGeneration = "0.1.2"
ExprTools = "0.1.4"
FDM = "0.6.1"
ForwardDiff = "0.10.12"
SpecialFunctions = "1.5.1"
julia = "^1.3"
julia = "1.3"

[extras]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Expand Down
2 changes: 1 addition & 1 deletion test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ end

@testset "get_output" begin
y = (-, get_output=true)(2)
@test y isa Tuple{Branch{Int}, Tuple{Int}}
@test y isa Tuple{Branch{Int}, Tuple{Real}}
@test last(y) == (-1,)
@test (unbox, get_output=true)(2) == (2, (0,))
end
Expand Down
8 changes: 6 additions & 2 deletions test/sensitivities/scalar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ end
@test Y isa Branch{Vector{Float64}}
@test unbox(Y) == Float64[1,2,3,4]

# In expressions
@test (x->2x)(1) === (2,)
# In expressions.
@test (x->2*float(x))(1) === (2.0,)

# Note that actually float or no float out is the same as
# integers always have floating point derivatives
@test (x->2x)(1) === (2.0,)

end
end

2 comments on commit 49bf7f5

@oxinabox
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/41628

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 v0.13.1 -m "<description of version>" 49bf7f597fcb5ef87f4e35f5c673663cf4cfd059
git push origin v0.13.1

Please sign in to comment.