RectGrid.meshgrid¶
-
property
RectGrid.
meshgrid
¶ A grid suitable for function evaluation.
- Returns
- meshgridtuple of
numpy.ndarray
’s Function evaluation grid with
ndim
axes
- meshgridtuple of
See also
numpy.meshgrid
Coordinate matrices from coordinate vectors. We use
indexing='ij'
andcopy=True
Examples
>>> g = RectGrid([0, 1], [-1, 0, 2]) >>> x, y = g.meshgrid >>> x array([[ 0.], [ 1.]]) >>> y array([[-1., 0., 2.]])
Easy function evaluation via broadcasting:
>>> x ** 2 - y ** 2 array([[-1., 0., -4.], [ 0., 1., -3.]])