RectGrid.points

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

All grid points in a single array.

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

Axis ordering in the resulting point array.

Returns
pointsnumpy.ndarray

The shape of the array is size x ndim, i.e. the points are stored as rows.

Examples

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