 |
NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Go to the documentation of this file.
51 template<
typename dtype>
54 uint32 randIdx = random::randInt<uint32>(0, inArray.
size());
55 return inArray[randIdx];
68 template<
typename dtype>
80 [&inArray](dtype& value) ->
void
82 value = choice(inArray);
NdArray< dtype > permutation(dtype inValue)
Definition: permutation.hpp:52
NdArray< dtype > replace(const NdArray< dtype > &inArray, dtype oldValue, dtype newValue)
Definition: replace.hpp:45
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:213
std::uint32_t uint32
Definition: Types.hpp:40
iterator end() noexcept
Definition: NdArrayCore.hpp:1431
size_type size() const noexcept
Definition: NdArrayCore.hpp:4370
dtype choice(const NdArray< dtype > &inArray)
Definition: choice.hpp:52
Definition: Coordinate.hpp:44
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
iterator begin() noexcept
Definition: NdArrayCore.hpp:1087
A Class for slicing into NdArrays.
Definition: Slice.hpp:43