for k in range(D):
    theSum += (xi[k] - a[k]) / (b[k] - a[k])
return theSum

def testExamples():
    D = 100000
x = np.random.rand(D)
a = np.zeros(D)
b = np.random.rand(D) + 1
for i in range(10000):
    example1(x, a, b, D)
example2(x, a, b, D)
Медленное деление в cython