Skip to content
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

Some Base.math functions don't have methods for Missing #32655

Open
ElOceanografo opened this issue Jul 22, 2019 · 1 comment
Open

Some Base.math functions don't have methods for Missing #32655

ElOceanografo opened this issue Jul 22, 2019 · 1 comment
Labels
domain:maths Mathematical functions domain:missing data Base.missing and related functionality

Comments

@ElOceanografo
Copy link
Contributor

I noticed this trying to convert a missing angle using deg2rad,

julia> deg2rad(missing)
ERROR: MethodError: no method matching deg2rad(::Missing)
Closest candidates are:
  deg2rad(::AbstractFloat) at math.jl:178
...

but it turns out there are a number of other Base.math functions with no method defined for Missings (e.g. asec, acoth, hypot...) . The loop here only defines Missing methods for a subset of the module's exported functions. Fix should be as easy as adding those names to the loop (unless there's some good reason to keep those methods undefined).

@ararslan ararslan added domain:maths Mathematical functions domain:missing data Base.missing and related functionality labels Jul 23, 2019
@ElOceanografo
Copy link
Contributor Author

Realized this is a partial duplicate of #32224. This PR will add missing methods for atan, hypot, and angle, but not all the similar functions exported by Base.math.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:maths Mathematical functions domain:missing data Base.missing and related functionality
Projects
None yet
Development

No branches or pull requests

2 participants