Skip to content

refactor: add error message for wrapped variable in collect_var! #3616

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

AayushSabharwal
Copy link
Member

It is very easy to end up with a wrapped variable (Num/Arr) in this function and think "this should just unwrap whatever it gets". That is not true, and this function should only ever receive unwrapped values. The error message makes this very clear and helps avoid more insidious bugs involving Nums creeping inside symbolic expressions.

@ChrisRackauckas ChrisRackauckas merged commit 4b52b02 into SciML:master May 9, 2025
34 of 45 checks passed
@AayushSabharwal AayushSabharwal deleted the as/safety-error branch May 9, 2025 11:34
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

Successfully merging this pull request may close these issues.

2 participants