Expand the shape of the data array in place.
Insert a new size 1 axis, corresponding to a given position in the data array shape.
Not to be confused with the expand_partition_dims method.
Parameters : |
axis : str, optional direction : bool, optional |
---|---|
Returns : | None |
Examples
>>> d.expand_dims(1)
>>> d.expand_dims(2, direction=True)
>>> d.expand_dims(-1, axis='dim3')
>>> d.expand_dims(0, direction=False, axis=None)