Note that there are some explanatory texts on larger screens.

plurals
  1. POError when using the python module numba
    primarykey
    data
    text
    <p>I have installed <strong>LLVM 3.2</strong> and all dependencies of <strong>numba</strong> (except Meta):</p> <ul> <li>LLVM 3.1 or 3.2</li> <li>llvmpy (from llvmpy/llvmpy fork)</li> <li>llvmmath</li> <li>numpy (version 1.6 or higher)</li> <li>Meta (from numba/Meta fork (optional))</li> <li>Cython (build dependency only)</li> <li>nose (for unit tests)</li> <li>argparse (for pycc)</li> </ul> <p>I installed LLVM 3.2 and llvmpy according to the instructions on this page <a href="https://github.com/llvmpy/llvmpy" rel="nofollow">https://github.com/llvmpy/llvmpy</a>. All the other python modules were installed using <strong>pip</strong>:</p> <pre><code>sudo pip install --upgrade module_name </code></pre> <p>Next I tried the numba examples on this page: <a href="http://jakevdp.github.io/blog/2012/08/24/numba-vs-cython/" rel="nofollow">http://jakevdp.github.io/blog/2012/08/24/numba-vs-cython/</a>. I stored both <code>pairwise_python</code> and <code>pairwise_numba</code> in a file named <code>performance.py</code>. Then when I run</p> <pre><code>from performance import * </code></pre> <p>in IPython I get the following error:</p> <pre><code>--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) &lt;ipython-input-4-c7c496c26b18&gt; in &lt;module&gt;() ----&gt; 1 import performance /home/carlos/Workspace/Freestyle/Numba/performance.py in &lt;module&gt;() 14 D[i, j] = np.sqrt(d) 15 ---&gt; 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: --&gt; 211 assert func.__code__.co_argcount == 0, func 212 return_type = None 213 argtys = [] AssertionError: &lt;function pairwise_numba at 0x4b61a28&gt; </code></pre> <p>And I am not able to use pairwise_python nor pairwise_numba. How can I get this to work?</p> <p><strong>System information</strong></p> <ul> <li>Linux Mint 13 KDE, 64 bit</li> <li>Default gcc compiler version: 4.8</li> <li>Python 2.7.3 (compiled with gcc 4.6.3)</li> <li>LLVM 3.2 (compiled with gcc 4.8)</li> <li>llvmpy 0.11.2</li> <li>llvmmath 0.1.1</li> <li>numpy 1.7.1</li> <li>cython 0.19.1</li> <li>nose 1.3.0</li> <li>argparse 1.2.1</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload