mlx.core.meshgrid

目錄

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

參數:
  • *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. If False, a dense grid is returned. Defaults to False.

  • indexing (str, optional) -- Cartesian ('xy') or matrix ('ij') indexing of the output arrays. Defaults to 'xy'.

回傳:

The output arrays.

回傳型別:

list(array)