cf.Domain.insert_axis

Domain.insert_axis(size, key=None, replace=True)[source]

Insert an axis into the domain in place.

This method has exactly the same interface, functionality and outputs as cf.Field.insert_axis. Therefore see cf.Field.insert_axis for the full documentation details.

See also

insert_aux, insert_measure`, insert_dim`, insert_ref`

Examples 1:
>>> d.insert_axis(24)
Parameters:
size
: int

The size of the new axis.

key
: str, optional

The domain identifier for the new axis. By default a new, unique identifier is generated.

replace
: bool, optional

If False then do not replace an existing axis with the same identifier but a different size. By default an existing axis with the same identifier is changed to have the new size.

Returns:
out :

The domain identifier of the new axis.

Examples 2:

See cf.Field.insert_axis.