# mlx.core.zeros — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.zeros

mlx.core.zeros(shape: Union[ int , List[ int ]], dtype: Optional[ Dtype ] = float32, *, stream: Union[ None , Stream , Device ] = None) → array

  Construct an array of zeros.

  Parameters:

    - 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`.

  Returns:

    The array of zeros with the specified shape.

  Return type:

    array