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

Cannot determine Numba type of <class 'function'> #5

Open
BrenoKenji01 opened this issue Sep 26, 2023 · 1 comment
Open

Cannot determine Numba type of <class 'function'> #5

BrenoKenji01 opened this issue Sep 26, 2023 · 1 comment

Comments

@BrenoKenji01
Copy link

BrenoKenji01 commented Sep 26, 2023

Hi,
I am using a python environment named Firedrake (PDE solver) together with another libraries called pygmsh to implement a dynamical system inside the function f(x,u). When I try to run the code, it appears that one of my utility functions has an incompatibility with Numba, even though it doesn't use Numba at all.

Is there any way to make Numba invoked by ilqr ignore my functions?

@Bharath2
Copy link
Owner

Try implementing your function like this:

@numba.njit
def f(x, u):
#code
with objmode():
# use firedrake
#code
return x_dot

let me know, if it works.

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

2 participants