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

Overload FiniteDifferences.to_vec for Composite #24

Closed
oxinabox opened this issue Apr 24, 2020 · 3 comments · Fixed by #25
Closed

Overload FiniteDifferences.to_vec for Composite #24

oxinabox opened this issue Apr 24, 2020 · 3 comments · Fixed by #25
Labels
wontfix This will not be worked on

Comments

@oxinabox
Copy link
Member

needed for JuliaDiff/ChainRules.jl#175

@oxinabox
Copy link
Member Author

writing the to_vec for Composite of a struct is fiddly.
Since fields might be in a different order and some might be missing.

I think easiest is probably to use canonicalize to force everything into some fields and order as the primal type, and fill in any zeros.
Though that also means assing support for Zero so many not?

Luckily once we solve to_vec we solve isapprox basically for free.

@nickrobinson251
Copy link
Contributor

alternative proposal that would make this redundant JuliaDiff/FiniteDifferences.jl#97
(the intention is to do that, instead of overloading to_vec)

@nickrobinson251 nickrobinson251 added the wontfix This will not be worked on label Aug 4, 2020
@nickrobinson251
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants