cupy.meshgrid(*xi, **kwargs)[source]#

Return coordinate matrices from coordinate vectors.

Given one-dimensional coordinate arrays x1, x2, ... , xn this function makes N-D grids.

For one-dimensional arrays x1, x2, ... , xn with lengths Ni = len(xi), this function returns (N1, N2, N3, ..., Nn) shaped arrays if indexing=’ij’ or (N2, N1, N3, ..., Nn) shaped arrays if indexing=’xy’.

Unlike NumPy, CuPy currently only supports 1-D arrays as inputs.

  • xi (tuple of ndarrays) – 1-D arrays representing the coordinates of a grid.

  • indexing ({'xy', 'ij'}, optional) – Cartesian (‘xy’, default) or matrix (‘ij’) indexing of output.

  • sparse (bool, optional) – If True, a sparse grid is returned in order to conserve memory. Default is False.

  • copy (bool, optional) – If False, a view into the original arrays are returned. Default is True.


list of cupy.ndarray

See also