#ifndef UFUNC_NAME #error missing UFUNC_NAME #endif #ifndef UFUNC_INAME #error missing UFUNC_INAME #endif // clang-format off #include INCLUDE_FILE(pythonic/include/operator_,UFUNC_INAME) // clang-format on #include "pythonic/include/numpy/reduce.hpp" #include "pythonic/include/utils/functor.hpp" PYTHONIC_NS_BEGIN namespace numpy { namespace UFUNC_NAME { template auto reduce(Arg &&arg) -> decltype(numpy::reduce( std::forward(arg), 0L)) { return numpy::reduce( std::forward(arg), 0L); } template auto reduce(Args &&... args) -> typename std::enable_if< sizeof...(Args) != 1, decltype(numpy::reduce( std::forward(args)...))>::type { return numpy::reduce( std::forward(args)...); } DEFINE_FUNCTOR(pythonic::numpy::UFUNC_NAME, reduce); } } PYTHONIC_NS_END