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

Add support for diffing expressions with indexed vars in differentiate2c #1483

Merged
merged 7 commits into from
Oct 7, 2024

Conversation

JCGoran
Copy link
Contributor

@JCGoran JCGoran commented Sep 30, 2024

Note that the independent var we are diffing against should not be an indexed var (yet), but every other var is fair game.

bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Sep 30, 2024
@JCGoran JCGoran marked this pull request as ready for review September 30, 2024 14:36
bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Sep 30, 2024
test/unit/ode/test_ode.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@1uc 1uc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one could still isolate it to make sure there's one notion of how to convert random stuff to symbols.

@JCGoran
Copy link
Contributor Author

JCGoran commented Oct 1, 2024

one could still isolate it to make sure there's one notion of how to convert random stuff to symbols.

In principle yes, but I feel that it would undoubtedly involve a bunch of heuristics (much like what SymPy is actually doing under the hood anyway). The least error-prone idea is to just put sympy_vars = {str(var) : var for var in vars}, and require the user passes an iterable of sympy objects (like [sp.Function('f'), sp.Symbol('x')]), and raise an error if they pass anything else.

@JCGoran JCGoran mentioned this pull request Oct 2, 2024
bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Oct 2, 2024
bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Oct 3, 2024
bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Oct 3, 2024
@JCGoran JCGoran merged commit 1909448 into master Oct 7, 2024
12 checks passed
@JCGoran JCGoran deleted the jelic/diff_indexed branch October 7, 2024 07:37
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