product
- arrayfire.product(array: Array, /, *, axis: None = None, nan_value: None = None) int | float | complex
- arrayfire.product(array: Array, /, *, axis: None, nan_value: float) int | float | complex
- arrayfire.product(array: Array, /, *, axis: int, nan_value: None = None) Array
- arrayfire.product(array: Array, /, *, axis: int, nan_value: float) Array
Calculate the product of all the elements along a specified dimension.
Parameters
- arrayArray
The multi-dimensional array to calculate the product of.
- axisint or None, optional, default: None
The dimension along which the product is calculated. If None, the product of all elements in the entire array is returned.
- nan_valuefloat or None, optional, default: None
The value to replace NaN (Not-a-Number) values in the array before computing the product. If None, NaN values are ignored.
Returns
- Array or scalar number
The product of all elements in array along dimension axis. If axis is None, the product of the entire array is returned.