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

Base.adjoint overload for ::Function is type piracy #260

Open
tkoolen opened this issue Jul 15, 2019 · 0 comments
Open

Base.adjoint overload for ::Function is type piracy #260

tkoolen opened this issue Jul 15, 2019 · 0 comments

Comments

@tkoolen
Copy link

tkoolen commented Jul 15, 2019

Base.adjoint(f::Function) = x -> gradient(f, x)[1]

is type piracy. Calculus is similarly committing type piracy (JuliaMath/Calculus.jl#133), leading to warnings like

WARNING: Method definition adjoint(Function) in module Zygote at /home/twan/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:50 overwritten in module Calculus at /home/twan/.julia/packages/Calculus/2qBLt/src/derivative.jl:33.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant