この例に従ってみました
http://numba.pydata.org/numba-doc/dev/pycc.html
私のコードのコンパイル済みバージョンを取得します。
しかし、私はそれをロードする方法がわかりません。これまでに試したことは次のとおりです。
test3.py:
from numba import export
def mult(a, b):
return a * b
export('mult f8(f8, f8)')(mult)
コマンドラインで:
pycc test3.py
ipython コンソールで:
import test3.so
# ImportError: dynamic module does not define init function (inittest3)
# this seems to be expected according to the numba-doc, it suggests use of ctypes
import ctypes
ctypes.cdll.LoadLibrary('test3.so')
# OSError: test3.so: cannot open shared object file: No such file or directory
これは私にエラーを与えます....
これは問題ではなく、ctypes
+の使い方を知らないということだと思います。どんな助けでも感謝します。pycc
numba