RectGrid.corners

RectGrid.corners(self, order='C')[source]

Corner points of the grid in a single array.

Parameters
order{‘C’, ‘F’}, optional

Axis ordering in the resulting point array

Returns
cornersnumpy.ndarray

The size of the array is 2^m x ndim, where m is the number of non-degenerate axes, i.e. the corners are stored as rows.

Examples

>>> g = RectGrid([0, 1], [-1, 0, 2])
>>> g.corners()
array([[ 0., -1.],
       [ 0.,  2.],
       [ 1., -1.],
       [ 1.,  2.]])
>>> g.corners(order='F')
array([[ 0., -1.],
       [ 1., -1.],
       [ 0.,  2.],
       [ 1.,  2.]])