mlx.core.meshgrid#
- meshgrid(*arrays: array, sparse: bool | None = False, indexing: str | None = 'xy', stream: None | Stream | Device = None) array#
Generate multidimensional coordinate grids from 1-D coordinate arrays
- Parameters:
*arrays (array) – Input arrays.
sparse (bool, optional) – If
True, a sparse grid is returned in which each output array has a single non-zero element. IfFalse, a dense grid is returned. Defaults toFalse.indexing (str, optional) – Cartesian (‘xy’) or matrix (‘ij’) indexing of the output arrays. Defaults to
'xy'.
- Returns:
The output arrays.
- Return type: