RectGrid.corner_grid

RectGrid.corner_grid()[source]

Return a grid with only the corner points.

Returns:
cgridRectGrid

Grid with size 2 in non-degenerate dimensions and 1 in degenerate ones

Examples

>>> g = RectGrid([0, 1], [-1, 0, 2])
>>> g.corner_grid()
uniform_grid([ 0., -1.], [ 1.,  2.], (2, 2))