Insert size 1 axes into the data array.
By default all size 1 domain axes which are not spanned by the field’s data array are inserted, but existing size 1 axes may be selected for insertion.
The axes are selected with the axes parameter.
The axes are inserted into the slowest varying data array positions.
See also
Examples 1: |
---|
Insert size all size 1 axes:
>>> g = f.unsqueeze()
Insert size 1 time axes:
>>> g = f.unsqueeze('T', size=1)
Parameters: |
|
---|---|
Returns: |
|
Examples 2: |
>>> print f
Data : air_temperature(time, latitude, longitude)
Cell methods : time: mean
Dimensions : time(1) = [15] days since 1860-1-1
: latitude(73) = [-90, ..., 90] degrees_north
: longitude(96) = [0, ..., 356.25] degrees_east
: height(1) = [2] m
Auxiliary coords:
>>> f.unsqueeze()
>>> print f
Data : air_temperature(height, time, latitude, longitude)
Cell methods : time: mean
Dimensions : time(1) = [15] days since 1860-1-1
: latitude(73) = [-90, ..., 90] degrees_north
: longitude(96) = [0, ..., 356.25] degrees_east
: height(1) = [2] m
Auxiliary coords: