def transpose(self, *axes):
if len(axes) == <NUM_LIT:0>:<EOL><INDENT>p = arange(self.ndim-<NUM_LIT:1>, -<NUM_LIT:1>, -<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>p = asarray(argpack(axes))<EOL><DEDENT>istransposeable(p, range(self.ndim))<EOL>split = self.split<EOL>new_keys, new_values = p[:split], p[split:]<EOL>swapping_keys = sort(new_values[new_values < split])<EOL>swapping_values = sort(new_keys[new_keys >= split])<EOL>stationary_keys = sort(new_keys[new_keys < split])<EOL>stationary_values = sort(new_values[new_values >= split])<EOL>p_swap = r_[stationary_keys, swapping_values, swapping_keys, stationary_values]<EOL>p_swap_inv = argsort(p_swap)<EOL>p_x = p_swap_inv[p]<EOL>p_keys, p_values = p_x[:split], p_x[split:]-split<EOL>arr = self.swap(swapping_keys, swapping_values-split)<EOL>arr = arr.keys.transpose(tuple(p_keys.tolist()))<EOL>arr = arr.values.transpose(tuple(p_values.tolist()))<EOL>return arr<EOL>
Return an array with the axes transposed.

This operation will incur a swap unless the
desiured permutation can be obtained
only by transpoing the keys or the values.

Parameters
----------
axes : None, tuple of ints, or n ints
    If None, will reverse axis order.