51 template<
typename dtype>
54 const auto shapeMask = inMask.
shape();
55 const auto shapeA = inA.
shape();
56 if (shapeA != inB.
shape())
61 if (shapeMask != shapeA)
69 for (
auto maskValue : inMask)
73 outArray[idx] = inA[idx];
77 outArray[idx] = inB[idx];
98 template<
typename dtype>
101 const auto shapeMask = inMask.
shape();
102 const auto shapeA = inA.
shape();
103 if (shapeMask != shapeA)
111 for (
auto maskValue : inMask)
115 outArray[idx] = inA[idx];
140 template<
typename dtype>
143 const auto shapeMask = inMask.
shape();
144 const auto shapeB = inB.
shape();
145 if (shapeMask != shapeB)
153 for (
auto maskValue : inMask)
161 outArray[idx] = inB[idx];
182 template<
typename dtype>
188 for (
auto maskValue : inMask)
#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
const Shape & shape() const noexcept
Definition: NdArrayCore.hpp:4511
Definition: Cartesian.hpp:40
NdArray< dtype > where(const NdArray< bool > &inMask, const NdArray< dtype > &inA, const NdArray< dtype > &inB)
Definition: where.hpp:52
std::uint32_t uint32
Definition: Types.hpp:40