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
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
size_type size() const noexcept
Definition NdArrayCore.hpp:4604
self_type transpose() const
Definition NdArrayCore.hpp:4963
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4591
const_reference front() const noexcept
Definition NdArrayCore.hpp:2940
bool isscalar() const noexcept
Definition NdArrayCore.hpp:3036
value_type item() const
Definition NdArrayCore.hpp:3102
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
@ LINEAR
Definition Enums.hpp:140
Axis
Enum To describe an axis.
Definition Enums.hpp:36
@ ROW
Definition Enums.hpp:38
@ COL
Definition Enums.hpp:39
@ NONE
Definition Enums.hpp:37
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
@ SHELL
Definition Enums.hpp:58
std::uint32_t uint32
Definition Types.hpp:40