55 template<
typename dtype>
67 std::vector<double> arrayCopy;
68 arrayCopy.reserve(inArray.
size());
69 for (
auto value : inArray)
73 arrayCopy.push_back(
static_cast<double>(value));
77 if (arrayCopy.empty())
95 for (
uint32 row = 0; row < inShape.
rows; ++row)
104 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:135
size_type size() const noexcept
Definition NdArrayCore.hpp:4600
self_type transpose() const
Definition NdArrayCore.hpp:4959
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4587
const_reference front() const noexcept
Definition NdArrayCore.hpp:2936
bool isscalar() const noexcept
Definition NdArrayCore.hpp:3032
value_type item() const
Definition NdArrayCore.hpp:3098
uint32 size_type
Definition NdArrayCore.hpp:152
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:39
NdArray< double > nanpercentile(const NdArray< dtype > &inArray, double inPercentile, Axis inAxis=Axis::NONE, InterpolationMethod inInterpMethod=InterpolationMethod::LINEAR)
Definition nanpercentile.hpp:56
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:63
bool isnan(dtype inValue) noexcept
Definition isnan.hpp:49
@ SHELL
Definition Enums.hpp:58
std::uint32_t uint32
Definition Types.hpp:40