A strange production of a tensor and a matrix

Solution 1:

You just need to keep transposing!

>>> (A @ x.T).T
array([[['abb', 'eff'],
        ['cdd', 'ghh']],

       [['aaabbbb', 'eeeffff'],
        ['cccdddd', 'ggghhhh']]], dtype=object)