cf.Variable.transpose¶
-
Variable.
transpose
(axes=None, i=False)[source]¶ Permute the dimensions of the data array.
See also
Parameters: - axes : (sequence of) int
The new axis order of the data array. By default the order is reversed. Each axis of the new order is identified by its original integer position.
- i : bool, optional
If True then update the variable in place. By default a new variable is created. In either case, a variable is returned.
Returns: out : cf.Variable
Examples: >>> f.shape (2, 3, 4) >>> f.transpose() >>> f.shape (4, 3, 2) >>> f.transpose([1, 2, 0]) >>> f.shape (3, 2, 4) >>> f.transpose((1, 0, 2)) >>> f.shape (2, 3, 4)