xtensor
Loading...
Searching...
No Matches
accumulating functions

Functions

template<class T = void, class E >
auto xt::cumsum (E &&e, std::ptrdiff_t axis)
 Cumulative sum.
 
template<class T = void, class E >
auto xt::cumprod (E &&e, std::ptrdiff_t axis)
 Cumulative product.
 

Detailed Description

Function Documentation

◆ cumprod()

template<class T = void, class E >
auto xt::cumprod ( E && e,
std::ptrdiff_t axis )
inline

Cumulative product.

Returns the accumulated product for the elements over given axis (or flattened).

Parameters
ean xexpression
axisthe axes along which the cumulative product is computed (optional)
Template Parameters
Tthe value type used for internal computation. The default is E::value_type. Tis also used for determining the value type of the result, which is the type of T() * E::value_type(). You can pass big_promote_value_type_t<E> to avoid overflow in computation.
Returns
an xarray<T>

Definition at line 2321 of file xmath.hpp.

◆ cumsum()

template<class T = void, class E >
auto xt::cumsum ( E && e,
std::ptrdiff_t axis )
inline

Cumulative sum.

Returns the accumulated sum for the elements over given axis (or flattened).

Parameters
ean xexpression
axisthe axes along which the cumulative sum is computed (optional)
Template Parameters
Tthe value type used for internal computation. The default is E::value_type. Tis also used for determining the value type of the result, which is the type of T() + E::value_type(). You can pass big_promote_value_type_t<E> to avoid overflow in computation.
Returns
an xarray<T>

Definition at line 2286 of file xmath.hpp.