cf.expand_dims

cf.expand_dims(x, *args, **kwargs)[source]

Return a new variable with an inserted size 1 axis.

The variable must have a copy method and an in-place expand_dims method, such as a cf.Field object. Any optional positional and keyword arguments are passed unchanged to the variable’s expand_dims method.

See the variable’s expand_dims method for details.

Parameters :
x :

The input variable.

args, kwargs :

See the input variable’s expand_dims method.

Returns :
out :

A new variable with size 1 axes inserted into the data array.

Previous topic

cf.sin

Next topic

cf.flip

This Page