| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/pythran/pythonic/include/numpy/ |
Upload File : |
#ifndef PYTHONIC_INCLUDE_NUMPY_PARTIAL_SUM_HPP
#define PYTHONIC_INCLUDE_NUMPY_PARTIAL_SUM_HPP
#include "pythonic/include/types/ndarray.hpp"
PYTHONIC_NS_BEGIN
namespace numpy
{
template <class Op, class E>
using result_dtype = types::dtype_t<decltype(std::declval<Op>()(
std::declval<typename std::remove_reference<E>::type::dtype>(),
std::declval<typename std::remove_reference<E>::type::dtype>()))>;
template <class Op, class E, class dtype = result_dtype<Op, E>>
types::ndarray<typename dtype::type, types::pshape<long>>
partial_sum(E const &expr, dtype d = dtype());
template <class Op, class E, class dtype = result_dtype<Op, E>>
auto partial_sum(E const &expr, long axis, dtype d = dtype()) ->
typename std::enable_if<E::value == 1,
decltype(partial_sum<Op, E, dtype>(expr))>::type;
template <class Op, class E, class dtype = result_dtype<Op, E>>
using partial_sum_type =
types::ndarray<typename dtype::type, types::array<long, E::value>>;
template <class Op, class E, class dtype = result_dtype<Op, E>>
using partial_sum_type2 =
types::ndarray<typename dtype::type, types::array<long, E::value - 1>>;
template <class Op, class E, class dtype = result_dtype<Op, E>>
typename std::enable_if<E::value != 1, partial_sum_type<Op, E, dtype>>::type
partial_sum(E const &expr, long axis, dtype d = dtype());
}
PYTHONIC_NS_END
#endif