31#include <initializer_list>
57 template<
typename dtype>
88 "all NdArrays of the choiceVec must be the same shape, and the same as condVec");
93 constexpr auto nullChoice = std::numeric_limits<size_type>::max();
100 for (size_type i = 0; i <
theCond.size(); ++i)
139 template<
typename dtype>
148 [](
auto&
cond)
noexcept ->
const NdArray<bool>* { return &cond; });
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition Error.hpp:37
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
uint32 size_type
Definition NdArrayCore.hpp:156
dtype choice(GeneratorType &generator, const NdArray< dtype > &inArray)
Definition choice.hpp:53
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition StlAlgorithms.hpp:775
Definition Cartesian.hpp:40
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59
NdArray< dtype > select(const std::vector< const NdArray< bool > * > &condVec, const std::vector< const NdArray< dtype > * > &choiceVec, dtype defaultValue=dtype{ 0 })
Definition select.hpp:58