cf.Field.unsqueeze¶
-
Field.
unsqueeze
(inplace=False, i=False, axes=None, **kwargs)[source]¶ Insert size 1 axes into the data array.
All size 1 domain axes which are not spanned by the field construct’s data are inserted.
The axes are inserted into the slowest varying data array positions.
See also
- Parameters
- inplace:
bool
, optional If True then do the operation in-place and return
None
.- i: deprecated at version 3.0.0
Use the inplace parameter instead.
axes: deprecated at version 3.0.0
kwargs: deprecated at version 3.0.0
- inplace:
- Returns
Examples
>>> g = f.unsqueeze() >>> f.unsqueeze(['dim2'], inplace=True)