NumCpp  2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
logical_xor.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <string>
31
35#include "NumCpp/NdArray.hpp"
36
37namespace nc
38{
39 //============================================================================
40 // Method Description:
50 template<typename dtype>
51 NdArray<bool> logical_xor(const NdArray<dtype>& inArray1, const NdArray<dtype>& inArray2)
52 {
54
55 return broadcast::broadcaster<bool>(inArray1,
56 inArray2,
57 [](dtype inValue1, dtype inValue2) -> bool {
58 return !utils::essentiallyEqual(inValue1, dtype{ 0 }) !=
59 !utils::essentiallyEqual(inValue2, dtype{ 0 });
60 });
61 }
62} // namespace nc
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:56
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition: essentiallyEqual.hpp:49
Definition: Cartesian.hpp:40
NdArray< bool > logical_xor(const NdArray< dtype > &inArray1, const NdArray< dtype > &inArray2)
Definition: logical_xor.hpp:51