Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

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

Merged
JCGoran merged 7 commits into
masterfrom
jelic/diff_indexed
Oct 7, 2024
Merged

Add support for diffing expressions with indexed vars in differentiate2c#1483
JCGoran merged 7 commits into
masterfrom
jelic/diff_indexed

Conversation

@JCGoran

@JCGoran JCGoran commented Sep 30, 2024

Copy link
Copy Markdown
Contributor

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
Comment thread test/unit/ode/test_ode.py Outdated

@1uc 1uc left a comment

Copy link
Copy Markdown
Collaborator

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

JCGoran commented Oct 1, 2024

Copy link
Copy Markdown
Contributor Author

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
@JCGoran JCGoran deleted the jelic/diff_indexed branch October 7, 2024 07:37
JCGoran added a commit to neuronsimulator/nrn that referenced this pull request Mar 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants