You can simply perform a cross product of matrics.
can be expressed using Einstein notation as
Code implementation of this problem using NumPy:
numpy.einsum('az,bz,cz,dz -> abcd', A, B, C, D)
so in your case, you would use
numpy.einsum('az,bz->ab', P.U[0], P.U[1])
or, in your 3-matrix case
numpy.einsum('az,bz,cz->abc', P.U[0], P.U[1], P.U[2])
sktensor.ktensor.ktensor also have a method totensor() that does exactly this:
np.allclose(np.einsum('az,bz->ab', P.U[0], P.U[1]), P.totensor())
>>> True
If you want to be build successful data science career then enroll
for best data science certification.
Hope this answer helps.