NumCpp  2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
polygamma.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#ifndef NUMCPP_NO_USE_BOOST
31
32#include "boost/math/special_functions/polygamma.hpp"
33
36#include "NumCpp/NdArray.hpp"
37
38namespace nc::special
39{
40 //============================================================================
41 // Method Description:
50 template<typename dtype>
52 {
54
55 return boost::math::polygamma(n, inValue);
56 }
57
58 //============================================================================
59 // Method Description:
68 template<typename dtype>
70 {
71 NdArray<decltype(polygamma(n, dtype{ 0 }))> returnArray(inArray.shape());
72
74 inArray.cend(),
75 returnArray.begin(),
76 [n](dtype inValue) -> auto { return polygamma(n, inValue); });
77
78 return returnArray;
79 }
80} // namespace nc::special
81
82#endif // #ifndef NUMCPP_NO_USE_BOOST
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
Definition airy_ai.hpp:39
auto polygamma(uint32 n, dtype inValue)
Definition polygamma.hpp:51
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition StlAlgorithms.hpp:775
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59
std::uint32_t uint32
Definition Types.hpp:40