I'm running into a big load of errors using numba. Ironically, the correct result is printed after the errors. I'm using the newest Anaconda python and installed numba with
conda install numba
once on Ubuntu 13, 64 bit and also anaconda 64 bit and on windows 64 bit with a 32 bit version of anaconda.
The script I'm trying to execute is:
# -*- coding: utf-8 -*-
import math
from numba import autojit
pi = math.pi
@autojit
def sinc(x):
if x == 0.0:
return 1.0
else:
return math.sin(x*pi)/(pi*x)
if __name__ == '__main__':
a = 4.5
print sinc(a)
and the errors I get are:
DEBUG -- translate:361:translate
; ModuleID = 'tmp.module.__main__.sinc.45bce60'
@PyArray_API = linkonce_odr global i8** inttoptr (i64 140030693224864 to i8**)
define double @__numba_specialized_0___main___2E_sinc(double %x) {
entry:
%return_value = alloca double
br label %"if_cond_13:7"
cleanup_label: ; preds = %"else_body_16:8", %"if_body_14:8", %error_label
%0 = load double* %return_value
ret double %0
error_label: ; No predecessors!
store double 0x7FF8000000000000, double* %return_value
br label %cleanup_label
"if_cond_13:7": ; preds = %entry
%1 = fcmp oeq double %x, 0.000000e+00
%2 = icmp ne i1 %1, false
br i1 %2, label %"if_body_14:8", label %"else_body_16:8"
"if_body_14:8": ; preds = %"if_cond_13:7"
store double 1.000000e+00, double* %return_value
br label %cleanup_label
"else_body_16:8": ; preds = %"if_cond_13:7"
%3 = fmul double %x, 0x400921FB54442D18
%4 = call double @"numba.math.['double'].sin"(double %3)
%5 = fmul double 0x400921FB54442D18, %x
%6 = fdiv double %4, %5
store double %6, double* %return_value
br label %cleanup_label
}
declare { i64, i8* }* @Py_BuildValue(i8*, ...)
declare i32 @PyArg_ParseTuple({ i64, i8* }*, i8*, ...)
declare void @PyErr_Clear()
declare double @"numba.math.['double'].sin"(double)
!tbaa = !{!0, !1}
!0 = metadata !{metadata !"root"}
!1 = metadata !{metadata !"char *", metadata !0}
DEBUG -- translate:361:translate
; ModuleID = 'numba_executable_module'
&#