-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port a few rules from Diffractor (#463)
* Handle AbstractZero in a few LinearAlgebra rules * Mark eltype(::Type) nondiff * Add rules for typeassert/ifelse Co-authored-by: Simeon Schaub <simeondavidschaub99@gmail.com> Co-authored-by: Miha Zgubic <mzgubic@users.noreply.github.com>
- Loading branch information
1 parent
3f18cd6
commit cf55350
Showing
6 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@testset "typeassert" begin | ||
test_rrule(typeassert, 1.1, Float64) | ||
test_frule(typeassert, 1.1, Float64) | ||
end | ||
|
||
@testset "ifelse" begin | ||
test_rrule(ifelse, true, 1.1, 2.0) | ||
test_frule(ifelse, false, 1.1, 2.0) | ||
|
||
test_rrule(ifelse, true, [1.1], [2.0]; check_inferred=false) | ||
test_frule(ifelse, false, [1.1], [2.0]; check_inferred=false) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cf55350
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
cf55350
There was a problem hiding this comment.
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/41852
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: