53 template<
typename dtype>
62 auto sum =
static_cast<double>(std::accumulate(
inArray.cbegin(),
66 return std::isnan(inValue2) ? inValue1
67 : inValue1 + inValue2;
71 static_cast<double>(std::accumulate(
inArray.cbegin(),
75 { return std::isnan(inValue2) ? inValue1 : inValue1 + 1; }));
87 auto sum =
static_cast<double>(
88 std::accumulate(
inArray.cbegin(row),
92 { return std::isnan(inValue2) ? inValue1 : inValue1 + inValue2; }));
95 static_cast<double>(std::accumulate(
inArray.cbegin(row),
99 return std::isnan(inValue2) ? inValue1 : inValue1 + 1;
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition Error.hpp:37
#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:139
A Shape Class for NdArrays.
Definition Core/shape.hpp:41
Definition Cartesian.hpp:40
Axis
Enum To describe an axis.
Definition Enums.hpp:36
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59
NdArray< dtype > sum(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition sum.hpp:46
NdArray< double > nanmean(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition nanmean.hpp:54
std::uint32_t uint32
Definition Types.hpp:40