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>
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:4524
iterator end() noexcept
Definition: NdArrayCore.hpp:1623
iterator begin() noexcept
Definition: NdArrayCore.hpp:1315
int32 index_type
Definition: NdArrayCore.hpp:157
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition: StlAlgorithms.hpp:775
Definition: Cartesian.hpp:40
Side
Definition: Enums.hpp:129
NdArray< dtype >::index_type searchsorted(const NdArray< dtype > &inArray, dtype inValue, Side side=Side::LEFT)
Definition: searchsorted.hpp:59