pymc.Minibatch.dimshuffle#
- Minibatch.dimshuffle(*pattern)#
Reorder the dimensions of this variable, optionally inserting broadcasted dimensions.
- Parameters
- pattern
List/tuple of int mixed with ‘x’ for broadcastable dimensions.
See also
DimShuffle
Notes
This function supports the pattern passed as a tuple, or as a variable-length argument (e.g.
a.dimshuffle(pattern)is equivalent toa.dimshuffle(*pattern)wherepatternis a list/tuple of ints mixed with ‘x’ characters).Examples
For example, to create a 3D view of a [2D] matrix, call
dimshuffle([0,'x',1]). This will create a 3D view such that the middle dimension is an implicit broadcasted dimension. To do the same thing on the transpose of that matrix, calldimshuffle([1, 'x', 0]).