NumCpp  2.18.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
remainder.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <cmath>
31
33#include "NumCpp/NdArray.hpp"
34
35namespace nc
36{
37 //============================================================================
38 // Method Description:
48 template<typename dtype>
49 double remainder(dtype inValue1, dtype inValue2) noexcept
50 {
52
53 return static_cast<double>(std::remainder(inValue1, inValue2));
54 }
55
56 //============================================================================
57 // Method Description:
67 template<typename dtype>
68 NdArray<double> remainder(const NdArray<dtype>& inArray1, const NdArray<dtype>& inArray2)
69 {
70 return broadcast::broadcaster<double>(inArray1,
71 inArray2,
72 [](dtype inValue1, dtype inValue2) noexcept -> double
73 { return remainder(inValue1, inValue2); });
74 }
75} // namespace nc
#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:135
NdArray< dtypeIn1 > & broadcaster(NdArray< dtypeIn1 > &inArray1, const NdArray< dtypeIn2 > &inArray2, const Function &function, const AdditionalFunctionArgs &&... additionalFunctionArgs)
Definition NdArrayBroadcast.hpp:51
Definition Cartesian.hpp:39
double remainder(dtype inValue1, dtype inValue2) noexcept
Definition remainder.hpp:49