【发布时间】:2025-11-30 18:45:01
【问题描述】:
我正在使用numba 0.34.0 和numpy 1.13.1。一个小例子如下所示:
import numpy as np
from numba import jit
@jit(nopython=True)
def initial(veh_size):
t = np.linspace(0, (100 - 1) * 30, 100, dtype=np.int32)
t0 = np.linspace(0, (veh_size - 1) * 30, veh_size, dtype=np.int32)
return t0
initial(100)
t 和t0 的行都有相同的错误信息。
错误信息:
numba.errors.InternalError: [1] During: resolving callee type: Function(<function linspace at 0x000001F977678C80>) [2] During: typing of call at ***/test1.py (6)
【问题讨论】: