cf.unsqueeze

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

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

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

See the variable’s transpose method for details.

Parameters :
x :

The input variable.

args, kwargs :

See the input variable’s unsqueeze method.

Returns :
out :

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

Previous topic

cf.transpose

Next topic

cf.equals

This Page