JuliaAstro / AstroLib.jl

Bundle of small astronomical and astrophysical routines.
http://juliaastro.github.io/AstroLib.jl/stable/
Other
78 stars 21 forks source link

Type Relaxation on sunpos #76

Closed Aman-Pandey-afk closed 2 years ago

Aman-Pandey-afk commented 2 years ago

Fix for issue https://github.com/JuliaAstro/AstroLib.jl/issues/73 .Removed the _sunpos function, and used two sunpos functions with Real and AbstractVector{<:Real} arguments, still casting the output to float to ensure it is type-stable. Works with most of the outputs of ForwardDiff functions, although can't exactly check the error in the issue as no code is provided to reproduce it.

giordano commented 2 years ago

This PR looks good, although it doesn't really solve #73 because of limitations in ForwardDiff.jl. Thanks!