-
Notifications
You must be signed in to change notification settings - Fork 57
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
Ambiguous Promotion Rule for <:Irrational,<:ReverseDiff.TrackedReal{V,D,O}} #100
Comments
As a follow-up, it appears that in addition to the above, when creating tape to compute Hessians of functions with distributions (e.g. Distributions.normcdf), the Distributions package doesn't know how to handle the ReverseDiff.TrackedArray type. For example, when trying to apply ReverseDiff to create the [tape of] the Hessian for Distributions.normcdf, Julia is unable to match
to either of the closest candidates:
|
Bump |
For the OP, it might suffice just to add For the second issue, that seems like a problem with whatever target code is calling that function, i.e. it looks external to ReverseDiff (I could be wrong, though). Why is a scalar function being called on an array? |
actually we should be able to just add |
Just ran into this issue with |
I was using ReverseDiff in a function that uses normcdf and observed the following error:
I suspect that the corrective code to avoid ambiguity looks something like:
promote_rule{R<:Irrational, V, D, O}(::Type{R}, ::Type{ReverseDiff.TrackedReal{V,D,O}}) = TrackedReal{promote_type(R,V),D,O}
Am I correct? If so, is this line worth adding to the repository to avoid similar ambiguities with irrationals in the future?
The text was updated successfully, but these errors were encountered: