NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
floor_divide.hpp
Go to the documentation of this file.
1
#pragma once
29
30
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
31
#include "
NumCpp/Functions/floor.hpp
"
32
#include "
NumCpp/NdArray.hpp
"
33
34
#include <cmath>
35
36
namespace
nc
37
{
38
//============================================================================
39
// Method Description:
49
template
<
typename
dtype>
50
dtype
floor_divide
(dtype inValue1, dtype inValue2) noexcept
51
{
52
STATIC_ASSERT_ARITHMETIC
(dtype);
53
54
return
std::floor
(inValue1 / inValue2);
55
}
56
57
//============================================================================
58
// Method Description:
68
template
<
typename
dtype>
69
NdArray<dtype>
floor_divide
(
const
NdArray<dtype>
& inArray1,
const
NdArray<dtype>
& inArray2)
70
{
71
return
floor
(inArray1 / inArray2);
72
}
73
}
// namespace nc
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition:
StaticAsserts.hpp:37
nc::NdArray< dtype >
nc::floor
dtype floor(dtype inValue) noexcept
Definition:
floor.hpp:48
NdArray.hpp
nc
Definition:
Coordinate.hpp:44
nc::floor_divide
dtype floor_divide(dtype inValue1, dtype inValue2) noexcept
Definition:
floor_divide.hpp:50
floor.hpp
include
NumCpp
Functions
floor_divide.hpp
Generated by
1.8.17