【发布时间】:2016-12-10 04:43:08
【问题描述】:
有没有办法将 np.newaxis 与 Numba nopython 一起使用?为了应用广播功能而不回退python?
例如
@jit(nopython=True)
def toto():
a = np.random.randn(20, 10)
b = np.random.randn(20)
c = np.random.randn(10)
d = a - b[:, np.newaxis] * c[np.newaxis, :]
return d
谢谢
【问题讨论】:
标签: numpy numba array-broadcasting