spectrochempy.NDDataset.expand_dims

NDDataset.expand_dims(dim=None)[source]

Expand the shape of an array.

Insert a new axis that will appear at the axis position in the expanded array shape.

Parameters

dim (int or str) – Position in the expanded axes where the new axis (or axes) is placed.

Returns

|NDDataset| – View of a with the number of dimensions increased.

See also

squeeze

The inverse operation, removing singleton dimensions.