Numpile 基于 LLVM 的科学计算 Python 包

Numpile 是极小的,由千行 Python 代码构成的,基于 LLVM 的数值科学计算工具。

from numpile import autojit

@autojit

def dot(a, b):
    c = 0
    n = a.shape[0]
    for i in range(n):
       c += a[i]*b[i]
    return c

a = np.array(range(1000,2000), dtype=\'int32\')
b = np.array(range(3000,4000), dtype=\'int32\')
print dot(a,b)

更多介绍请看这里

© 版权声明
THE END
喜欢就支持一下吧
点赞667 分享