Skip to content
fn

prod_op

→TensorImplPtr
int prod_op(const int & a, const int & axes, bool keepdims)

Python wrappers

Public Python APIs implemented by this engine symbol.

Reduce a by multiplication along axes.

Promotes narrow integer dtypes to int64 (same headroom logic as sum_op).

See Also

ProdBackward — backward node.

Parameters

aTensorImplPtr
Input tensor.
axesstd::vector<int>
Axes to reduce. Negative indices wrap.
keepdimsbool
If true, retains reduced dims as size-1.

Returns

TensorImplPtr

Output tensor. Empty reductions yield 11.