NumCpp  2.18.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
isposinf.hpp
Go to the documentation of this file.
1
28#pragma once
29
31#include "NumCpp/NdArray.hpp"
32
33namespace nc
34{
35 //============================================================================
36 // Method Description:
45 template<typename dtype>
46 bool isposinf(dtype inValue) noexcept
47 {
49
50 return inValue > 0 && std::isinf(inValue);
51 }
52
53 //============================================================================
54 // Method Description:
63 template<typename dtype>
65 {
66 NdArray<bool> returnArray(inArray.shape());
68 inArray.cend(),
69 returnArray.begin(),
70 [](dtype inValue) noexcept -> bool { return isposinf(inValue); });
71
72 return returnArray;
73 }
74} // namespace nc
#define STATIC_ASSERT_FLOAT(dtype)
Definition StaticAsserts.hpp:50
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:135
const_iterator cbegin() const noexcept
Definition NdArrayCore.hpp:1361
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4587
const_iterator cend() const noexcept
Definition NdArrayCore.hpp:1669
iterator begin() noexcept
Definition NdArrayCore.hpp:1311
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition StlAlgorithms.hpp:776
Definition Cartesian.hpp:39
bool isposinf(dtype inValue) noexcept
Definition isposinf.hpp:46