ivy.reduce_prod(x, axis=None, keepdims=False, f=None)[source]

Multiplies array elements along a given axis.

  • x (array) – Elements to multiply.

  • axis (int or sequence of ints) – Axis or axes along which a multiplication is performed. The default, axis=None, will multiply all of the elements of the input array. If axis is negative it counts from the last to the first axis. If axis is a tuple of ints, a multiplication is performed on all of the axes specified in the tuple instead of a single axis or all the axes as before.

  • keepdims (bool, optional) – If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


The array with multiplications computed.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty