57 template<
typename dtype>
67 return std::distance(inArray.
begin(), std::lower_bound(inArray.
begin(), inArray.
end(), inValue));
71 return std::distance(inArray.
begin(), std::upper_bound(inArray.
begin(), inArray.
end(), inValue));
97 template<
typename dtype>
98 NdArray<typename NdArray<dtype>::index_type>
102 std::transform(inValues.
begin(),
105 [&inArray, side](
const auto& value) { return searchsorted(inArray, value, side); });
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition StaticAsserts.hpp:56
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
iterator end() noexcept
Definition NdArrayCore.hpp:1623
iterator begin() noexcept
Definition NdArrayCore.hpp:1315
int32 index_type
Definition NdArrayCore.hpp:157
Definition Cartesian.hpp:40
Side
Definition Enums.hpp:129
@ RIGHT
Definition Enums.hpp:131
@ LEFT
Definition Enums.hpp:130
NdArray< dtype >::index_type searchsorted(const NdArray< dtype > &inArray, dtype inValue, Side side=Side::LEFT)
Definition searchsorted.hpp:59