string printing for transpose, tensordot