zeros(shape: Union[int, Tuple[int, ...]], *, dtype: Optional[dtype] = None, device: Optional[device] = None) array

Returns a new array having a specified shape and filled with zeros.

  • shape (Union[int, Tuple[int, ...]]) – output array shape.

  • dtype (Optional[dtype]) – output array data type. If dtype is None, the output array data type must be the default floating-point data type. Default: None.

  • device (Optional[device]) – device on which to place the created array. Default: None.


out (array) – an array containing zeros.