 |
NumCpp
2.1.0
A C++ implementation of the Python Numpy library
|
Go to the documentation of this file.
56 template<
typename dtype>
68 constexpr
bool useEndPoint =
true;
70 static_cast<double>(inArray.
max().
item()), inNumBins + 1, useEndPoint);
75 constexpr
bool keepSearching =
true;
80 const uint32 idx = (lowIdx + highIdx) / 2;
81 if (lowIdx == highIdx || lowIdx == highIdx - 1)
88 if (inArray[i] > binEdges[idx])
92 else if (inArray[i] < binEdges[idx])
105 return std::make_pair(histo, binEdges);
value_type item() const
Definition: NdArrayCore.hpp:2958
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:38
NdArray< dtype > max(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:2979
std::uint32_t uint32
Definition: Types.hpp:41
size_type size() const noexcept
Definition: NdArrayCore.hpp:4326
NdArray< dtype > linspace(dtype inStart, dtype inStop, uint32 inNum=50, bool endPoint=true)
Definition: linspace.hpp:63
Definition: Coordinate.hpp:45
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37
std::pair< NdArray< uint32 >, NdArray< double > > histogram(const NdArray< dtype > &inArray, uint32 inNumBins=10)
Definition: histogram.hpp:57
NdArray< dtype > min(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:3036