You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make a jitclass that can take either a list or an array as an argument, to then convert to an array with numpy.array(). However, it seems like the numpy.array() method doesn't handle array types properly. Here's a minimal (failing) example of this problem.
Here's what seems to be the relevant parts of the error message (I can post more if helpful), which occurs on simply defining the function above:
TypingError: Invalid usage of Function(<built-in function array>) with parameters (array(float64, 1d, A))
* parameterized
In definition 0:
TypingError: array(float64, 1d, A) not allowed in a homogenous sequence
[1] During: resolving callee type: Function(<built-in function array>)
[2] During: typing of call at <ipython-input-163-4b2e73a0638f> (3)
Failed at nopython (nopython frontend)
Invalid usage of Function(<built-in function array>) with parameters (array(float64, 1d, A))
* parameterized
In definition 0:
TypingError: array(float64, 1d, A) not allowed in a homogenous sequence
[1] During: resolving callee type: Function(<built-in function array>)
[2] During: typing of call at <ipython-input-163-4b2e73a0638f> (3)
The text was updated successfully, but these errors were encountered:
I'm trying to make a
jitclass
that can take either a list or an array as an argument, to then convert to an array withnumpy.array()
. However, it seems like thenumpy.array()
method doesn't handle array types properly. Here's a minimal (failing) example of this problem.Here's what seems to be the relevant parts of the error message (I can post more if helpful), which occurs on simply defining the function above:
The text was updated successfully, but these errors were encountered: