RectGrid.squeeze¶
-
RectGrid.
squeeze
(self, axis=None)[source]¶ Return the grid with removed degenerate (length 1) dimensions.
- Parameters
- axisNone or index expression, optional
Subset of the axes to squeeze. Default: All axes.
- Returns
- squeezed
RectGrid
Squeezed grid.
- squeezed
Examples
>>> g = RectGrid([0, 1], [-1], [-1, 0, 2]) >>> g.squeeze() RectGrid( [ 0., 1.], [-1., 0., 2.] )