cf.DimensionCoordinate.expand_dims

DimensionCoordinate.expand_dims(position=0, i=False)[source]

Insert a size 1 axis into the data array.

See also

flip, squeeze, transpose

Examples 1:
>>> g = f.expand_dims()
Parameters:
position: int, optional

Specify the position amongst the data array axes where the new axis is to be inserted. By default the new axis is inserted at position 0, the slowest varying position.

bounds: bool, optional

If False then do not alter the dimension coordinate’s bounds, if it has any. By default any bounds are also altered.

i: bool, optional

If True then update the dimension coordinate in place. By default a new dimension coordinate is created. In either case, a dimension coordinate is returned.

Returns:

None

Examples:
>>> v.expand_dims(2)
>>> v.expand_dims(-1)