NumCpp
2.16.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
sqr.hpp
Go to the documentation of this file.
1
28
#pragma once
29
30
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
31
32
namespace
nc::utils
33
{
34
//============================================================================
41
template
<
typename
dtype>
42
constexpr
dtype
sqr
(
dtype
inValue
)
noexcept
43
{
44
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(
dtype
);
45
46
return
inValue
*
inValue
;
47
}
48
}
// namespace nc::utils
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition
StaticAsserts.hpp:56
nc::utils
Definition
Utils/cube.hpp:33
nc::utils::sqr
constexpr dtype sqr(dtype inValue) noexcept
Definition
sqr.hpp:42
nc::arange
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition
arange.hpp:59
include
NumCpp
Utils
sqr.hpp
Generated by
1.9.8