mlx.core.zeros

目錄

mlx.core.zeros#

zeros(shape: int | Sequence[int], dtype: Dtype | None = float32, *, stream: None | Stream | Device = None) array#

Construct an array of zeros.

參數:
  • shape (int or list(int)) -- The shape of the output array.

  • dtype (Dtype, optional) -- Data type of the output array. If unspecified the output type defaults to float32.

回傳:

The array of zeros with the specified shape.

回傳型別:

array