62 template<
typename dtype>
74 std::vector<double> arrayCopy;
75 arrayCopy.reserve(inArray.
size());
76 for (
auto value : inArray)
80 arrayCopy.push_back(
static_cast<double>(value));
84 if (arrayCopy.empty())
102 for (
uint32 row = 0; row < inShape.
rows; ++row)
111 returnArray[row] = outValue.
item();
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37
#define STATIC_ASSERT_FLOAT(dtype)
Definition: StaticAsserts.hpp:50
size_type size() const noexcept
Definition: NdArrayCore.hpp:4524
self_type transpose() const
Definition: NdArrayCore.hpp:4882
const Shape & shape() const noexcept
Definition: NdArrayCore.hpp:4511
const_reference front() const noexcept
Definition: NdArrayCore.hpp:2860
bool isscalar() const noexcept
Definition: NdArrayCore.hpp:2956
value_type item() const
Definition: NdArrayCore.hpp:3022
uint32 size_type
Definition: NdArrayCore.hpp:156
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
uint32 rows
Definition: Core/Shape.hpp:44
uint32 cols
Definition: Core/Shape.hpp:45
const double nan
NaN.
Definition: Core/Constants.hpp:41
Definition: Cartesian.hpp:40
NdArray< double > nanpercentile(const NdArray< dtype > &inArray, double inPercentile, Axis inAxis=Axis::NONE, InterpolationMethod inInterpMethod=InterpolationMethod::LINEAR)
Definition: nanpercentile.hpp:63
InterpolationMethod
Definition: Enums.hpp:139
Axis
Enum To describe an axis.
Definition: Enums.hpp:36
NdArray< double > percentile(const NdArray< dtype > &inArray, double inPercentile, Axis inAxis=Axis::NONE, InterpolationMethod inInterpMethod=InterpolationMethod::LINEAR)
Definition: percentile.hpp:66
bool isnan(dtype inValue) noexcept
Definition: isnan.hpp:49
std::uint32_t uint32
Definition: Types.hpp:40