IntervalProd.squeeze

IntervalProd.squeeze(self)[source]

Remove the degenerate dimensions.

Note that no changes are made in-place.

Returns
squeezedIntervalProd

Squeezed set.

Examples

>>> min_pt, max_pt = [-1, 0, 2], [-0.5, 1, 3]
>>> rbox = IntervalProd(min_pt, max_pt)
>>> rbox.collapse(1, 0).squeeze()
IntervalProd([-1.,  2.], [-0.5,  3. ])
>>> rbox.collapse([1, 2], [0, 2.5]).squeeze()
IntervalProd(-1.0, -0.5)
>>> rbox.collapse([0, 1, 2], [-1, 0, 2.5]).squeeze()
IntervalProd([], [])