57 template<
typename dtype>
62 dtype maxValue = inArray.
max().
item();
72 "array values too large, will result in gigantic array that will take up alot of memory...");
82 [&outArray](dtype value) noexcept ->
void { ++outArray[value]; });
107 template<
typename dtype>
117 dtype maxValue = inArray.
max().
item();
127 "array values too large, will result in gigantic array that will take up alot of memory...");
138 [&outArray, &inWeights, &counter](dtype value) noexcept ->
void
139 { outArray[value] += inWeights[counter++]; });
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37
#define STATIC_ASSERT_INTEGER(dtype)
Definition: StaticAsserts.hpp:43
Holds info about the dtype.
Definition: DtypeInfo.hpp:41
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:139
self_type max(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:3041
self_type & zeros() noexcept
Definition: NdArrayCore.hpp:4900
const_iterator cbegin() const noexcept
Definition: NdArrayCore.hpp:1365
const Shape & shape() const noexcept
Definition: NdArrayCore.hpp:4511
const_iterator cend() const noexcept
Definition: NdArrayCore.hpp:1673
value_type item() const
Definition: NdArrayCore.hpp:3022
self_type clip(value_type inMin, value_type inMax) const
Definition: NdArrayCore.hpp:2373
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:225
Definition: Cartesian.hpp:40
NdArray< dtype > bincount(const NdArray< dtype > &inArray, uint16 inMinLength=1)
Definition: bincount.hpp:58
std::uint16_t uint16
Definition: Types.hpp:41
std::uint32_t uint32
Definition: Types.hpp:40
NdArray< dtype > max(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition: max.hpp:44