Numba support
(Moving the discussion to a separate issue)
Mario Boley: Will this work also well together with Numba?
(Moving the discussion to a separate issue)
Mario Boley: Will this work also well together with Numba?
changed the description
I had a quick look at this and it seems like numba cannot infer the return types from sortednp methods. Nevertheless, you can compile it if you set forceobj
, although this has some performance implications.
import numpy as np
from numba import jit
import sortednp as snp
@jit(forceobj=True)
def foo():
a = np.array([1,2,3,4,4,4,5])
b = np.array([2,3,3,5])
return snp.intersect(a, b)
Let's see what's necessary to make numba able to infer the correct return types.
mentioned in issue #34 (closed)