我正在尝试加速一组旋转矩阵的计算,这些计算会产生一个3D矩阵(维度= 3x3xnumv,其中numv是顶点的数量)。到目前为止,我的jit函数导致计算速度明显变慢。 from numpy import sin, cos, ones, sqrt, array, float64, zeros, isnan, shape
from numpy.linalg import norm
from numb
我有一个函数,我想用numba进行编译,但是我需要计算该函数内部的阶乘。不幸的是numba不支持math.factorial: import math
import numba as nb
@nb.njit
def factorial1(x):
return math.factorial(x)
factorial1(10)
# UntypedAttributeError: