print('tensor - total time:', min(timeit.repeat(stmt=tensor, setup=
    setup_code, number=10, repeat=3)))
print('basic - total time:', min(timeit.repeat(stmt=basic, setup=setup_code,
    number=10, repeat=3)))
print('einsum - total time:', min(timeit.repeat(stmt=einsum, setup=
    setup_code, number=10, repeat=3)))
Multiply high order matrices with numpy