numpy.prod(a, axis=None, dtype=None, out=None, keepdims=False) [source]
Return the product of array elements over a given axis. Parameters:
a : array_like Input data. axis : None or int or tuple of ints, optional Axis or axes along which a product is performed. The default, axis=None, will calculate the product of all the elements in the input array. If axis is negative it counts from the last to the first axis. New in version 1.7.0. If axis is a tuple of ints, a product is performed