Skip to content

Fix missing index in CSTR.equations #232

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

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

xalelax
Copy link

@xalelax xalelax commented May 9, 2025

I wasn't able to instantiate neuromancer.psl.nonautonomous.CSTR -- not even with default arguments; after some investigation, I found out that this is due to a missing index in the CSTR.equations method, which results in its output being

>>> [dCadt, dTdt]
[1.2090975763656697e-07, array([1.101448], dtype=float32)]

and this mix of a scalar and rank 0 array causes issues later on .cast calls in the cast_backend decorator.

I think this PR would also solve #229

@drgona drgona changed the base branch from master to develop May 13, 2025 14:52
@drgona
Copy link
Collaborator

drgona commented May 13, 2025

thank you for this fix @xalelax - please rebase your PR from develop branch and we will be ready to merge

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.

3 participants