numpy - Error when using the python module numba -


i have installed llvm 3.2 , 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 , llvmpy according instructions on page https://github.com/llvmpy/llvmpy. other python modules installed using pip:

sudo pip install --upgrade module_name 

next tried numba examples on page: http://jakevdp.github.io/blog/2012/08/24/numba-vs-cython/. stored both pairwise_python , pairwise_numba in file named performance.py. when run

from performance import * 

in ipython 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 none: --> 211             assert func.__code__.co_argcount == 0, func     212             return_type = none     213             argtys = []  assertionerror: <function pairwise_numba @ 0x4b61a28> 

and not able use pairwise_python nor pairwise_numba. how can work?

system information

  • linux mint 13 kde, 64 bit
  • default gcc compiler version: 4.8
  • python 2.7.3 (compiled gcc 4.6.3)
  • llvm 3.2 (compiled gcc 4.8)
  • llvmpy 0.11.2
  • llvmmath 0.1.1
  • numpy 1.7.1
  • cython 0.19.1
  • nose 1.3.0
  • argparse 1.2.1

it seems passing wrong arguments @jit, try using:

@autojit def yourfunction(...):     ... 

if give more details function can tell wrong @jit statement.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -