cf.Variable.expand_dims

Variable.expand_dims(position=0, direction=True, axis=None)[source]

Insert a size 1 axis into the data array.

Parameters :
position : int, optional

Position (amongst axes) where new axis is to be inserted. By default, insert at position 0.

direction : bool, optional

axis : str, optional

Returns :

None

See also

flip, squeeze, transpose

Examples

>>> v.expand_dims(2, False, None)

Previous topic

cf.Variable.equals

Next topic

cf.Variable.fill_value

This Page