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
Currently casting a numpy array with dtype=np.complex128 and passing it to cffi function is not possible in nopython mode.
from numba import cffi_support, njit
import numpy as np
def f(a):
cdata = cffi_support.ffi.from_buffer('double []', a)
a = np.ascontiguousarray([], dtype=np.complex128)
f(a)
njit(f)(a)
It would be great if different cdata could be passed. Since now it supports only the default cdata="char[]"
TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of BoundFunction(ffi.from_buffer for ffi) with parameters (Literal[str](double []), array(complex128, 1d, C))
* parameterized
[1] During: resolving callee type: BoundFunction(ffi.from_buffer for ffi)
[2] During: typing of call at <ipython-input-27-3dc53d0b7bf1> (4)
The text was updated successfully, but these errors were encountered:
Feature request
Currently casting a numpy array with dtype=np.complex128 and passing it to cffi function is not possible in nopython mode.
It would be great if different cdata could be passed. Since now it supports only the default cdata="char[]"
The text was updated successfully, but these errors were encountered: