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

errors in numba version #4

Open
tmacattank opened this issue Apr 17, 2022 · 4 comments
Open

errors in numba version #4

tmacattank opened this issue Apr 17, 2022 · 4 comments

Comments

@tmacattank
Copy link

Hi,
when i try to run the code, it comes out some errors as follows:
`Traceback (most recent call last):
File "/home/ykezvd/workspace/iLQR/original/iLQR/examples/vehicle_control.py", line 70, in
xs, us, cost_trace = controller.fit(x0, us_init, 100)
File "/home/ykezvd/workspace/iLQR/original/iLQR/examples/../ilqr/controller.py", line 34, in fit
return run_ilqr(self.dynamics.f, self.dynamics.f_prime, self.cost.L,
File "/home/ykezvd/anaconda3/lib/python3.9/site-packages/numba/core/dispatcher.py", line 482, in _compile_for_args
error_rewrite(e, 'typing')
File "/home/ykezvd/anaconda3/lib/python3.9/site-packages/numba/core/dispatcher.py", line 423, in error_rewrite
raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function() found for signature:

array(array(float64, 1d, C))

There are 4 candidate implementations:

  • Of which 4 did not match due to:
    Overload in function '_OverloadWrapper._build..ol_generated': File: numba/core/overload_glue.py: Line 131.
    With argument(s): '(array(float64, 1d, C))':
    Rejected as the implementation raised a specific error:
    TypingError: Failed in nopython mode pipeline (step: nopython frontend)
    No implementation of function Function() found for signature:

    stub(array(float64, 1d, C))

There are 2 candidate implementations:
- Of which 2 did not match due to:
Intrinsic in function 'stub': File: numba/core/overload_glue.py: Line 35.
With argument(s): '(array(float64, 1d, C))':
Rejected as the implementation raised a specific error:
TypingError: array(float64, 1d, C) not allowed in a homogeneous sequence
raised from /home/ykezvd/anaconda3/lib/python3.9/site-packages/numba/core/typing/npydecl.py:487

`
It seems that there are some conflicts in numba version, and my version only support a homogeneous sequence, can you give a list of your python and numba version?

@housx
Copy link

housx commented Feb 14, 2023

遇到同样的问题

@ThomasMullen
Copy link

I have encountered the same problem too

@YBoWang
Copy link

YBoWang commented May 29, 2023

Hi,

It seems that i had also encountered the same problem, and i fix it follows Overload np.array to accept arrays. Specifically, i just change one line of code in ilqr/utils.py (line 103) from
f_new = lambda *args: np.array(f(*args)) into f_new = lambda *args: np.asarray(f(*args)).

If this problem remains, i think you could have a try.

Good luck.

@may210297
Copy link

Hi,

It seems that i had also encountered the same problem, and i fix it follows Overload np.array to accept arrays. Specifically, i just change one line of code in ilqr/utils.py (line 103) from f_new = lambda *args: np.array(f(*args)) into f_new = lambda *args: np.asarray(f(*args)).

If this problem remains, i think you could have a try.

Good luck.

Thank you!

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

5 participants