cf.Field.expand_dims

Field.expand_dims(position=0, axis=None, **kwargs)[source]

Insert a size 1 axis into the data array.

Parameters :
position : int, optional

Specify the position amongst the field’s 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.

axis, kwargs : optional

Specify the axis to insert. By default a new size 1 axis is inserted which doesn’t yet exist.

If axis and/or kwargs are set then the axis is the unique, size 1 axis that would be selected by this call of the field’s axes method: f.axes(axis, size=1, **kwargs). See cf.Field.axes for details.

Returns :
out : str

The domain identifier of the inserted axis.

Examples

Previous topic

cf.Field.equivalent_domain

Next topic

cf.Field.fill_value

This Page