cf.Domain.expand_dims

Domain.expand_dims(coord=None, size=1, finalize=True)[source]

Expand the domain with a new dimension in place.

The new dimension may by of any size greater then 0.

Parameters :
coord : cf.Coordinate, optional

A dimension coordinate for the new dimension. The new dimension’s size is set to the size of the coordinate’s array.

size : int, optional

The size of the new dimension. By default a dimension of size 1 is introduced. Ignored if coord is set.

Returns :

None

Examples

>>> d.expand_dims()
>>> d.expand_dims(size=12)
>>> c
<CF Coordinate: >
>>> d.expand_dims(coord=c)

Previous topic

cf.Domain.equivalent_transform

Next topic

cf.Domain.finalize

This Page