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

Jacobian not functioning well for log and exp inside blocks #20

Open
ludwigstraub opened this issue Jan 30, 2024 · 0 comments
Open

Jacobian not functioning well for log and exp inside blocks #20

ludwigstraub opened this issue Jan 30, 2024 · 0 comments

Comments

@ludwigstraub
Copy link
Collaborator

A reminder that we need to fix the following issue.

Whenever we use np.log or np.exp in a block, it throws an error when computing Jacobians.

Here is a minimal example:

import numpy as np
import matplotlib.pyplot as plt
import sequence_jacobian as sj

@sj.simple
def test(x):
    y = np.exp(x)
    return y

ss = test.steady_state({'x': 1})
test.jacobian(ss, inputs=['x'], outputs=['y'], T=100)

The current workaround is to write y = x.apply(np.exp) inside the block, which is pretty cumbersome.

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

No branches or pull requests

1 participant