ivy.zeros(shape, dtype_str='float32', dev_str=None, f=None)[source]

Return a new array of given shape and type, filled with zeros.

  • shape (sequence of ints) – Shape of the new array, e.g. (2, 3).

  • dtype_str – The desired data-type for the array in string format, i.e. ‘float32’ or ‘int64’.

Default is ‘float32’. :type dtype_str: data-type string, optional :param dev_str: device on which to create the array ‘cuda:0’, ‘cuda:1’, ‘cpu’ etc.. :type dev_str: str :param f: Machine learning framework. Inferred from inputs if None. :type f: ml_framework, optional :return: Tensor of zeros with the given shape and dtype_str.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty