-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some rules for scaled airy and bessel functions and incomplete gamma #66
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #66 +/- ##
==========================================
+ Coverage 96.95% 97.07% +0.12%
==========================================
Files 3 3
Lines 164 171 +7
==========================================
+ Hits 159 166 +7
Misses 5 5
Continue to review full report at Codecov.
|
Test failure on Julia 1.0:
Were these methods added to SpecialFunctions in a version which doesn't support Julia 1.0? |
Should I qualify some rules with something like if VERSION < v"0.7-" as you have for |
For I don't think you can just branch on the version of Julia, unless somehow that version of SpecialFunctions doesn't support newer Julia versions. But you could make the tests check what methods exist before testing. |
If you guide me to know when the method was added, I can do that. Same for the tests. :) |
Maybe it's enough to test It doesn't quite belong in
Re versions my thinking is that if in future this stops supporting some old versions of SpecialFunctions, then it's nice to know what bits you can delete. I looked through the closed PRs but this didn't jump out. I think the way to find out is git blame, which when viewing the source on github's web page is a button top-right. |
I installed Julia 1.0 to test locally and |
Now it's other packages don't pass the tests :( |
Same test in Symbolics.jl failing on CI for an unrelated PR: https://github.com/JuliaSymbolics/Symbolics.jl/pull/373/checks?check_run_id=3563295246 Ditto for ModelingToolkit.jl failure: https://github.com/SciML/ModelingToolkit.jl/pull/1252/checks?check_run_id=3528813219 |
So what can I do now? |
I resolved the conflicts and removed the check for |
The ReverseDiff test errors are caused by (correct) NaN values. This is not a problem of this PR but rather of ReverseDiff's tests: https://github.com/JuliaDiff/ReverseDiff.jl/blob/d522508aa6fea16e9716607cdd27d63453bb61e6/test/utils.jl#L9-L13 Maybe this could be fixed (and also the currently skipped functions tested properly) if one uses |
@mcabbott Are you fine with updating the SpecialFunctions compat entry to "1.2, 2"? |
@define_diffrule SpecialFunctions.hankelh1x(ν, x) = | ||
:NaN, :( (SpecialFunctions.hankelh1x($ν - 1, $x) - SpecialFunctions.hankelh1x($ν + 1, $x)) / 2 - im * SpecialFunctions.hankelh1x($ν, $x) ) |
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.
I always assumed that DiffRules only deals with functions with real arguments and real outputs - but hankelh1x
, hankelh2x
, and also hankelh1
and hankelh2
for which a rule is already defined output complex numbers. So complex numbers are supported officially? It seems based on the derivatives for conj
and adjoint
that you added in #54 you also thought that DiffRules only deals with real numbers @mcabbott?
No description provided.