NumCpp  2.10.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
remainder.hpp
Go to the documentation of this file.
1 #pragma once
29 
30 #include <cmath>
31 #include <string>
32 
36 #include "NumCpp/Core/Types.hpp"
37 #include "NumCpp/NdArray.hpp"
38 
39 namespace nc
40 {
41  //============================================================================
42  // Method Description:
52  template<typename dtype>
53  double remainder(dtype inValue1, dtype inValue2) noexcept
54  {
56 
57  return static_cast<double>(std::remainder(inValue1, inValue2));
58  }
59 
60  //============================================================================
61  // Method Description:
71  template<typename dtype>
72  NdArray<double> remainder(const NdArray<dtype>& inArray1, const NdArray<dtype>& inArray2)
73  {
74  return broadcast::broadcaster<double>(inArray1,
75  inArray2,
76  [](dtype inValue1, dtype inValue2) noexcept -> double
77  { return remainder(inValue1, inValue2); });
78  }
79 } // namespace nc
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:39
Definition: Coordinate.hpp:45
double remainder(dtype inValue1, dtype inValue2) noexcept
Definition: remainder.hpp:53
NdArray< double > remainder(const NdArray< dtype > &inArray1, const NdArray< dtype > &inArray2)
Definition: remainder.hpp:72