# squeeze¶

ivy.squeeze(x, axis=None, f=None)[source]

Removes a single-dimensional entry from the shape of an array.

Parameters
• x (array) – Input data.

• axis (int, optional) – Index for one of the single-dimensional entries in the shape. If an axis is selected with shape entry greater than one, an error is raised.

• f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

The input array, but with all (axis=None) or one (axis is int) of the dimensions of length 1 removed.

Supported Frameworks: