Friday, 23 August 2013

Error when using the python module numba

Error when using the python module numba

I have installed LLVM 3.2 and all dependencies of numba (except Meta):
LLVM 3.1 or 3.2
llvmpy (from llvmpy/llvmpy fork)
llvmmath
numpy (version 1.6 or higher)
Meta (from numba/Meta fork (optional))
Cython (build dependency only)
nose (for unit tests)
argparse (for pycc)
I installed LLVM 3.2 and llvmpy according to the instructions on this page
https://github.com/llvmpy/llvmpy. All the other python modules were
installed using pip:
sudo pip install --upgrade module_name
Next I tried the numba examples on this page:
http://jakevdp.github.io/blog/2012/08/24/numba-vs-cython/. I stored both
pairwise_python and pairwise_numba in a file named performance.py. Then
when I run
from performance import *
in IPython I get the following error:
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-4-c7c496c26b18> in <module>()
----> 1 import performance
/home/carlos/Workspace/Freestyle/Numba/performance.py in <module>()
14 D[i, j] = np.sqrt(d)
15
---> 16 @jit(arg_types=[double[:,:], double[:,:]])
17 def pairwise_numba(X, D):
18 M = X.shape[0]
/usr/local/lib/python2.7/dist-packages/numba/decorators.pyc in
_jit_decorator(func)
209 argtys = restype.args
210 elif argtys is None:
--> 211 assert func.__code__.co_argcount == 0, func
212 return_type = None
213 argtys = []
AssertionError: <function pairwise_numba at 0x4b61a28>
And I am not able to use pairwise_python nor pairwise_numba. How can I get
this to work?

No comments:

Post a Comment