python numba安装失败,尝试numba的巨大错误

在使用numba时遇到了错误,但最终正确结果仍能显示。错误信息显示为LLVM中间代码,并包含一些警告。可能的原因是调试级别设置过高。解决方案包括检查numba版本,参考已关闭的numba问题,或通过设置logging.INFO来降低numba代码生成模块的日志级别。
摘要由CSDN通过智能技术生成

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'

&#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值