pydims.expand_dims#
- pydims.expand_dims(array, /, sizes)[source]#
Expand an array by adding new dimensions of the given sizes at the beginning.
Note that in contrast to the underlying expand_dims function, this function does not add dimensions of size 1, since this library implements broadcasting differently.
Use
permute_dims()
to control the order of the old and new dimensions.