 |
NumCpp
2.3.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Go to the documentation of this file.
55 template<
typename dtype>
67 constexpr
bool useEndPoint =
true;
69 static_cast<double>(inArray.
max().
item()), inNumBins + 1, useEndPoint);
74 constexpr
bool keepSearching =
true;
79 const uint32 idx = (lowIdx + highIdx) / 2;
80 if (lowIdx == highIdx || lowIdx == highIdx - 1)
87 if (inArray[i] > binEdges[idx])
91 else if (inArray[i] < binEdges[idx])
104 return std::make_pair(histo, binEdges);
value_type item() const
Definition: NdArrayCore.hpp:2957
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:37
NdArray< dtype > max(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:2978
std::uint32_t uint32
Definition: Types.hpp:40
size_type size() const noexcept
Definition: NdArrayCore.hpp:4325
NdArray< dtype > linspace(dtype inStart, dtype inStop, uint32 inNum=50, bool endPoint=true)
Definition: linspace.hpp:62
Definition: Coordinate.hpp:44
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
std::pair< NdArray< uint32 >, NdArray< double > > histogram(const NdArray< dtype > &inArray, uint32 inNumBins=10)
Definition: histogram.hpp:56
NdArray< dtype > min(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:3035