pymel.util.arrays.prod

static arrays.prod(a, start=1, axis=None)

prod(a[, start=1[, axis=(axis0, axis1, ...)]]) –> numeric or Array

Returns the product of all the components of a, an iterable of values that support the mul operator, times start. If axis are specified will return an Array of prod(x) for x in a.axisiter(*axis).

>>> A = Array([[1,2,3],[4,5,6]])
>>> print A.formated()
[[1, 2, 3],
 [4, 5, 6]]
>>> prod(A)
720
>>> prod(A, axis=(0, 1))
720
>>> prod(A, axis=0)
Array([4, 10, 18])
>>> prod(A, axis=1)
Array([6, 120])

Previous topic

pymel.util.arrays.pow

Next topic

pymel.util.arrays.radians

Core

Core Modules

Other Modules

This Page