def multidet(a, b, c):
    n = a.shape[0]
d = np.empty(n)
for i in range(n):
    u, v, w = a[i], b[i], c[i]
d[i] = u[0] * (v[1] * w[2] - v[2] * w[1]) + u[1] * (v[2] * w[0] - v[0] * w[2]
    ) + u[2] * (v[0] * w[1] - v[1] * w[0])
return d
Быстрый скалярный тройной продукт в numpy