MCPcopy Create free account
hub / github.com/numpy/numpy / product

Function product

numpy/core/fromnumeric.py:3833–3845  ·  view source on GitHub ↗

Return the product of array elements over a given axis. .. deprecated:: 1.25.0 ``product`` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead. See Also -------- prod : equivalent function; see for details.

(*args, **kwargs)

Source from the content-addressed store, hash-verified

3831
3832@array_function_dispatch(_product_dispatcher, verify=False)
3833def product(*args, **kwargs):
3834 """
3835 Return the product of array elements over a given axis.
3836
3837 .. deprecated:: 1.25.0
3838 ``product`` is deprecated as of NumPy 1.25.0, and will be
3839 removed in NumPy 2.0. Please use `prod` instead.
3840
3841 See Also
3842 --------
3843 prod : equivalent function; see for details.
3844 """
3845 return prod(*args, **kwargs)
3846
3847
3848def _cumproduct_dispatcher(a, axis=None, dtype=None, out=None):

Callers 6

test_addsumprodMethod · 0.90
test_reduceMethod · 0.90
test_scalar_promotionMethod · 0.85
test_multidimMethod · 0.85
test_testAddSumProdMethod · 0.85
test_reduceMethod · 0.85

Calls 1

prodFunction · 0.70

Tested by 6

test_addsumprodMethod · 0.72
test_reduceMethod · 0.72
test_scalar_promotionMethod · 0.68
test_multidimMethod · 0.68
test_testAddSumProdMethod · 0.68
test_reduceMethod · 0.68