50 template<
typename dtype1,
typename dtype2>
57 typename decltype(
result)::size_type
idx{ 0 };
58 std::for_each(x.
begin(),
62 const auto upperBin = std::upper_bound(uniqueBins.begin(), uniqueBins.end(), value);
63 result[idx++] = static_cast<uint32>(std::distance(uniqueBins.begin(), upperBin));
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:4600
iterator end() noexcept
Definition NdArrayCore.hpp:1623
iterator begin() noexcept
Definition NdArrayCore.hpp:1315
Definition Cartesian.hpp:40
NdArray< uint32 > digitize(const NdArray< dtype1 > &x, const NdArray< dtype2 > &bins)
Definition digitize.hpp:51
NdArray< dtype > unique(const NdArray< dtype > &inArray)
Definition unique.hpp:53
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59