-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Fix dual type promotion in remake with dummy derivatives #3337
Fix dual type promotion in remake with dummy derivatives #3337
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is at least a reasonable thing to do.
Actually no, this can be unsafe. Instead of generating a new variable (which might not match the other if metadata is applied), you'd want to do it the transform the same way the initialization problem does it. Though I am a bit confused, u0map is already processed right there? |
What does the |
It's grabbing the variable itself that already exists, rather than making a new one. The new one is a new symbol which is not guaranteed to match the actual dummy derivative. |
Ok, thanks. Is this better? |
But yes, it is probably better to do this higher up in the call hierarchy, in case other functions also depend on the dummy derivative substitution being performed? Where would that be? |
b2449bf
to
60e4723
Compare
This seems to fix the minimal example in #3336.
I am still having problems with a slightly more complicated example, though.