mm.math.prod

math.prod(axis=None)

The product of all elements in array.

Parameters:
  • array (ndarray[Tuple[int, ...], Union[TypeVar(R, float16, float32, float64), TypeVar(C, complex64, complex128), TypeVar(Z, int16, int32, int64), TypeVar(N, uint16, uint32, uint64)]]) – The array of elements to calculate the product of.

  • axis – The axis along which a product is performed. If None, it calculates the product of all elements in array.

Return type:

ndarray[Tuple[int, ...], Union[TypeVar(R, float16, float32, float64), TypeVar(C, complex64, complex128), TypeVar(Z, int16, int32, int64), TypeVar(N, uint16, uint32, uint64)]]

Returns:

The product of the elements in array.